- This topic has 9 replies, 4 voices, and was last updated 3 years, 3 months ago by Tom.
-
AuthorPosts
-
December 26, 2020 at 3:02 pm #1595178Carsten
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!
December 27, 2020 at 5:15 am #1595494DavidStaffCustomer SupportHi 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 thewp_head
hookhttps://docs.generatepress.com/article/hooks-element-overview/
December 27, 2020 at 7:38 am #1595763CarstenHi 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
December 27, 2020 at 4:06 pm #1596086ElvinStaffCustomer SupportHi,
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’shref
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.
December 28, 2020 at 4:37 pm #1597526CarstenHi 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
December 28, 2020 at 5:32 pm #1597551ElvinStaffCustomer SupportThere’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.
December 29, 2020 at 5:37 am #1598094CarstenHi, 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
December 29, 2020 at 12:09 pm #1598662TomLead DeveloperLead DeveloperWhen 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.December 29, 2020 at 12:20 pm #1598681CarstenHi 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!
December 29, 2020 at 12:24 pm #1598689TomLead DeveloperLead DeveloperNo problem! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.