Archived topic
Is adding a Site Icon the same as adding a favicon?
9 replies · Started by Carsten on December 26, 2020
Hi there, I hope everyone have had a Wonderful Christmas?
I have a question about the missing favicon.ico on my site. In GTMetrix Waterfall the search for a favicon, is affecting performance.
I have saved an favicon.ico file to the root folder, my wp-content folder, but the favicon does not show.
I can see that I should add this code to the <link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />to the <head> code of my site, but I can't locate the file to put the code into.
If I add a Site icon in Customize, the search time for favicon.ico in Waterfall is gone.
Is adding a Site Icon in the Customizing Site Identity, the same as adding a favicon.ico, even if the Site icon is stored in the media library and not as an .ico file?
Thanks!
Hi there,
if you want to place the Favicon directly in the root folder then you can use a Hook Element to add your <link> to the wp_head hook
https://docs.generatepress.com/article/hooks-element-overview/
Hi there, thanks for getting back to me.
If I should not place the Favicon in the root folder, where would be the place to place it?
I wonder why the Favicon isn’t part of a Wordpress installation if it’s needed?
Is the site icon added in the Customize the same as a Favicon?
Regards
Hi,
If I should not place the Favicon in the root folder, where would be the place to place it?
You can actually do that.
Just remember the file path so you can write it in your <link> tag's href attribute.
I wonder why the Favicon isn’t part of a WordPress installation if it’s needed?
It's not needed/necessary. Not all WordPress sites use Favicon. Some prefer their own custom SVG files. :)
Is the site icon added in the Customize the same as a Favicon?
Unfortunately, no. By default, GeneratePress' "icons" setting under Appearance > Customize > General Settings only has 2 options in it(Font based icons vs. SVG based icons).
You'll have to manually add it by either PHP snippets or as HTML content depending on where you want to place it.
Hi there, thanks for your explanation.
But the call for a favicon.ico stops when a site icon is added, what is the explanation to that?
Regards
There's an 404 error.
That usually means the file wasn't found or it has permission issues that prevents it from being requested.
Perhaps you've changed some server settings or file permission settings when you've added the file(FTP).
Note: This is something normally fixed through changing permissions through FTP or editing of .htaccess file. This has nothing to do with the theme.
Hi, there, I know it's not directly a theme issue, I just wanted to know, why the 404 error disappeared when I added a Site icon through the theme customize settings.
Thanks
When you add a Site Icon (Customize > Site Identity), WordPress adds it as a favicon to your <head>. The browser checks for the existence of the tag that WordPress adds before requesting the favicon. If the tag exists, the browser won't request the file.
Hi there, thank you for the concise explanation, I expected it to be that way, but wasn't able to get this confirmed before now.
Thanks again!
No problem! :)