WordPress.org

Forums

[resolved] Why Isn't My Favicon Showing Up? (13 posts)

  1. agfreesafety
    Member
    Posted 2 years ago #

    I placed the code in this WordPress thread in my header.php, however the favicon isn't showing up when you visit the website.

    Here's the section of code that I added it to in the header.php file:

    I'm wondering if I placed it in the wrong place, perhaps?

    `</a>
    <?php endif; // end check for removed header image ?>
    <?php // Has the text been hidden?
    if ( 'blank' == get_header_textcolor() ) :
    ?>

    <link rel="shortcut icon" href="http://myhousesforsaleindetroit.com/wp-content/uploads/2012/09/favicon.ico" type="image/vnd.microsoft.icon"/>
    <link rel="icon" href="http://myhousesforsaleindetroit.com/wp-content/uploads/2012/09/favicon.ico" type="image/x-ico"/>

    <?php endif; ?>
    </div>
    <div id="main">`

    What did I do wrong?

    Here's a link to my entire header.php file.

    Thanks in advance

  2. kmessinger
    Forum Moderator
    Posted 2 years ago #

    Is your favicon a box with lower case wp?

    If so I see it in IE, FF and Chrome.

  3. agfreesafety
    Member
    Posted 2 years ago #

    No, it should be a red house

  4. agfreesafety
    Member
    Posted 2 years ago #

    Here's a link to the image that I'm trying to get to show up.

  5. Andrew Bartel
    Member
    Posted 2 years ago #

    You've got it inside of the if statement, so if that statement evaluates to false, i.e. blank does not equal get_header_textcolor() then whatever is inside will not run.

    Move it outside and you should be good to go.

  6. kmessinger
    Forum Moderator
    Posted 2 years ago #

    http://myhousesforsaleindetroit.com/wp-content/themes/blogolife/images/favicon.ico from your source code links to something that looks like a wordpress favicon

  7. agfreesafety
    Member
    Posted 2 years ago #

    OK, I took it out of the if statement (good catch).

    It's showing up for me in Firefox, but not in IE, and I even cleared my history/cache in IE.

    Does it show up for any of you guys when you visit the site?

  8. agfreesafety
    Member
    Posted 2 years ago #

    http://myhousesforsaleindetroit.com/wp-content/themes/blogolife/images/favicon.ico from your source code links to something that looks like a wordpress favicon

    Shouldn't it?

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    It can take a few days for a new favicon to show up in your web browser. They're obviously cached somewhere but not in the standard cache.

  10. agfreesafety
    Member
    Posted 2 years ago #

    It can take a few days for a new favicon to show up in your web browser. They're obviously cached somewhere but not in the standard cache.

    Cool. Thanks guys.

  11. kmessinger
    Forum Moderator
    Posted 2 years ago #

    Shouldn't it?

    Not if you want the little house.
    <link rel="shortcut icon" href="http://myhousesforsaleindetroit.com/wp-content/themes/blogolife/images/favicon.ico" /> in the header will result in the wp ico showing up.

    The easiest to show your icon in the browser or whatever page someone adds as a favorite, is to upload your new icon to the main directory of your site, ie. http://www.example.com/favicon.ico.

  12. agfreesafety
    Member
    Posted 2 years ago #

    When I go to http://myhousesforsaleindetroit.com/wp-content/uploads/2012/09/favicon.ico it takes me to the right spot, there's an icon of a little red house.

  13. kmessinger
    Forum Moderator
    Posted 2 years ago #

    That is true for me also but the code you have in the header (my previous post) goes to a wp icon.

    Yous should change it to
    <link rel="shortcut icon" href="http://myhousesforsaleindetroit.com/wp-content/uploads/2012/09/favicon.ico" /> if that is where your .ico is going to live.

    http://codex.wordpress.org/Creating_a_Favicon

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags