WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] favicon

[Resolved] favicon

  • Hi,

    My favicon stopped working when I updated a couple versions ago and I haven’t been able to fix it.

    I tried following the codex’s instructions as seen here, but I haven’t had any luck. I copied the header.php from the parent theme into the child theme and made sure it was editable–but then the site wouldn’t load–so I went back to square one. My header.php is only in the parent theme and I’ve added the following code after the <head> but it’s not working.

    <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico"

    So far as I understand it, the reason for using a child theme is so that if your theme releases an update you don’t lose everything you’ve changed, but if I’m willing to risk that… I should be able to edit the parent theme’s header.php.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Correction! It seems that the favicon works only for users that aren’t logged in. Could it be something to do with bbpress or buddypress? I know buddypress adds some kind of a persistent header when you’re logged in?

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    Favicons are cached by browsers. You use your site more than any other person, most likely. You’re most likely to have a favicon cached in the browser.

    I know clearing caches is a pain, but it does work if you do it a couple times. 🙂

    the above code is looking into the child theme directory for the favicon. Try copying it from the parent theme to the same place in the child (or better yet, put a custom one in your child).

    I tried reseting my cache. No dice. The favicon.ico is now located in my root WordPress directory, parent theme, and child theme.

    The favicon works in the back-end now, but as soon as I’m looking at the front-end site it disappears.

    Well, I just checked and it seems to work fine in Firefox. So I guess the problem is Safari.

    Fixed it. I had to “Remove All Website Data”

    Safari > Preferences > Privacy > Remove All Website Data

    Thanks guys!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] favicon’ is closed to new replies.