[Resolved] Is adding a Site Icon the same as adding a favicon?

Home Forums Support [Resolved] Is adding a Site Icon the same as adding a favicon?

Home Forums Support Is adding a Site Icon the same as adding a favicon?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1595178
    Carsten

    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!

    #1595494
    David
    Staff
    Customer Support

    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/

    #1595763
    Carsten

    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

    #1596086
    Elvin
    Staff
    Customer Support

    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.

    #1597526
    Carsten

    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?

    View post on imgur.com

    View post on imgur.com

    Regards

    #1597551
    Elvin
    Staff
    Customer Support

    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.

    #1598094
    Carsten

    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

    #1598662
    Tom
    Lead Developer
    Lead Developer

    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.

    #1598681
    Carsten

    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!

    #1598689
    Tom
    Lead Developer
    Lead Developer

    No problem! 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.