- This topic has 16 replies, 2 voices, and was last updated 5 years, 8 months ago by Clevelus.
-
AuthorPosts
-
July 29, 2018 at 12:49 pm #635440Clevelus
If set favicon brousers show it correctly … But Yandex Webmasters and other is show error for ico file.
https://docs.generatepress.com/article/site-identity-overview/
If checked this: https://realfavicongenerator.net/favicon_checker
Errors:
favicon.ico is missing some icons of recommended sizes (16×16, 32×32, 48×48)
Image https://site.name/favicon.ico is ill-formed
Image … may not be useful regarding its sizeFor iOS Safari errors:
Image … may not be useful regarding its size
There is no Touch icon in the root directoryAnd other errors.
If install the plugin https://ru.wordpress.org/plugins/favicon-by-realfavicongenerator/ , is not fully work with GeneratePress theme (see topic link).
July 29, 2018 at 5:20 pm #635594TomLead DeveloperLead DeveloperSome tools check the root directory of your website for a
favicon.ico
file.WordPress has a “site icon” option in “Customize > Site Identity” which sets the favicon a different way.
Those tools are likely looking in the root directory for the
.ico
file, so if you add that, you shouldn’t have any issues.The favicon is separate from any theme or plugin, as the
.ico
file in the root directory applies to any website (including non-WordPress sites), and the site icon option is a core WordPress option.July 30, 2018 at 1:57 pm #636440ClevelusIf you put the favicon.ico by hand in the root of the site – this solves the problem.
But it’s not right. ๐July 30, 2018 at 8:34 pm #636595TomLead DeveloperLead DeveloperWhat about it isn’t right?
July 31, 2018 at 7:28 am #636960ClevelusI wrote that it was not so.
Some sites and browsers require an ISO file. This is normal and it’s standard. If you put third-party plug-ins, then they form this file as well.
But as a result in GeneratePress, the file https://your-site/favicon.ico is opens, but in png format (or other format). The extension does not match the file type. The file size is not according to the standard. And there are errors.July 31, 2018 at 8:56 am #637078TomLead DeveloperLead DeveloperI’m sorry, I don’t really understand what you mean?
Themes themselves (whether it’s GP or another theme) shouldn’t have any effect on the favicon at all. Your browser either looks for a favicon.ico file in the root directory of the theme, or it looks for meta tags in the
<head>
of your site, which are added by WordPress if you set the Site Icon in the Customizer: https://www.wpbeginner.com/wp-tutorials/how-to-add-a-favicon-to-your-wordpress-blog/Are you saying when you open the favicon.ico file in your browser, the result is different than what you expect?
July 31, 2018 at 9:03 am #637082ClevelusI’m use plugin https://ru.wordpress.org/plugins/favicon-by-realfavicongenerator/
This plugin generate ico files and favicon.ico, but WordPress with GeneratePress don’t show it.
I’m copy favicon.ico from plugin directory to site root (other icon files work fine) and this is worked.July 31, 2018 at 10:19 am #637133TomLead DeveloperLead DeveloperThat’s good! So it’s all fixed now? ๐
July 31, 2018 at 10:38 am #637146ClevelusI did not write the plugin author.
The main error is favicon.icoGoto
https://generatepress.com/favicon.ico — good
(But if you remove the Favicon from the root of the site, there will be no 404 error, the picture will open but it will not display correctly.)
and check
https://realfavicongenerator.net/favicon_checker?protocol=https&site=generatepress.com
See last section “Classic, desktop browsers”For Generatepress site:
favicon.ico is present — good!
But: favicon.ico is missing some icons of recommended sizes (48×48)
Ok.
But if you remove the Favicon from the root of the site?This manual https://www.wpbeginner.com/wp-tutorials/how-to-add-a-favicon-to-your-wordpress-blog/ is Error or not working in GeneratePress.
PNG not equal ICO – this is error!
And some services will give a error for favicon (as Yandex Webmaster and other)!I solved the problem by putting the correct file in the root of the site. And since it is present, it does not call the PHP (which returns the file if it is not physically present).
But it’s not right.July 31, 2018 at 2:56 pm #637290TomLead DeveloperLead DeveloperThanks for that, just updated our favicon size.
I did some looking around and found this: https://stackoverflow.com/questions/51398737/favicon-ico-missing-of-size-32×32-48×48-although-its-declared
It seems his tool will output that warning if favicon.ico is missing from the root directory, even if you’ve declared the icons elsewhere.
July 31, 2018 at 3:05 pm #637300ClevelusIf I delete the Favicon at the root of the site, then still, when I request https://site-name/favicon.ico, WordPress displays something. It’s the wrong size and wrong format (png instead of iso)
For different tasks there should be different icons. This is optional.
But if something is returned to the query https://site-name/favicon.ico, it must be strictly formatted. As I understand it.
Either an error (404) on requesting https://site-name/favicon.ico, it’s bad but not an error. Or return the correct favicon.ico (only such a name, the right format, one of the right sizes).
July 31, 2018 at 3:26 pm #637327TomLead DeveloperLead DeveloperAre you sure what you’re seeing isn’t just cached? WordPress itself shouldn’t serve a file at that URL if the file itself doesn’t exist. Of course, I’m not an expert when it comes to favicons, so perhaps there is something happening in the background within WP itself when favicon.ico isn’t reachable.
July 31, 2018 at 3:31 pm #637331ClevelusNo. Caching has nothing to do with it.
I have repeatedly met on forums that the WordPress Themes can misbehave favicon. WordPress does not mean placing an icon in the root with your hands, this should be done by the topic.Try to delete (change the name) in the root of the Favicon. And then open it simply in the browser (or check the server’s response). The server response is 200 and the picture is returned (but in the case of the GeneratePress theme of the wrong format and size).
July 31, 2018 at 4:53 pm #637358TomLead DeveloperLead DeveloperThat’s super strange – I’m not sure what could be causing that. The theme itself doesn’t have any favicon related code in it at all.
Here’s a vanilla GP install: http://tomusborne.com/dev/
And the calling favicon.ico gives us a 404 (as it should): http://tomusborne.com/dev/favicon.ico
July 31, 2018 at 11:28 pm #637517ClevelusFavicon ONLY in root site.
See: http://tomusborne.com/favicon.icoGoogle shows the globe if the icon is not set or has errors
http://www.google.com/s2/favicons?domain=tomusborne.comBut there is an icon! It’s the wrong format (even the browser can not display), possibly of the wrong size.
Check: https://realfavicongenerator.net/favicon_checker?protocol=https&site=tomusborne.com
And see: two gross errors (the last error is 48x, the standard (imho) is not an error, but a warning)
favicon.ico is present !!!
http://site and https://site and https://site:8091 – these are different sites
http://www.site and http://site – these are different sites
http://site and http://site/dir – this is the same siteDifferent sites can have different content.
If the sites are mirrors, then a redirect with code 301 to the main mirror must be installed (not necessarily, there may be 200 code, but the content should coincide by more than 80%, but a highly recommended redirect with code 301). In this case, each site should give its own: favicon.iso (without redirection, otherwise it will be considered that there are no icons on this site), robots.txt (it is desirable, while the HOST directive should point to the main mirror), sitemap.xml (preferably on the main mirror and not necessarily on the referring sites).
If the site does not return its icon, for example, a redirect to everything, then this site does not have an icon. Often this does not cause problems, but they can be. And the redirect does not apply to the topic itself. I make special exceptions in nginx (or .htaccess).location ~ /(robots\.txt|sitemap*\.xml|yandex_*\.html|wmail*\.html|google*\.html|favicon.ico)$ { allow all; log_not_found off; access_log off; try_files $uri $uri/ /index.php?$args; } location / { return 301 https://$host:443$request_uri; }
But this is no longer relevant to the theme established in WordPress (usually, sometimes it depends on the topic)
-
AuthorPosts
- You must be logged in to reply to this topic.