[resolved] favicon (6 posts)

  1. keytastic
    Posted 1 year ago #


    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.

  2. keytastic
    Posted 1 year ago #

    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?

  3. 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. :)

  4. rfair404
    Posted 1 year ago #

    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).

  5. keytastic
    Posted 1 year ago #

    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.

  6. keytastic
    Posted 1 year ago #

    Fixed it. I had to "Remove All Website Data"

    Safari > Preferences > Privacy > Remove All Website Data

    Thanks guys!

Topic Closed

This topic has been closed to new replies.

About this Topic