WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Place for favicon (3 posts)

  1. Charlotte Muse
    Member
    Posted 1 year ago #

    I´ve read through some topics of using a favicon in the twenty twelve theme. I´ve put the code below in function file. Put the favicon image named favicon.ico both in theme folder and in root of the site. Still doesn´t function. Any ideas?

    function favicon_link() {
        echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "\n";
    }
    add_action( 'wp_head', 'favicon_link' );

  2. paulwpxp
    Font hero
    Posted 1 year ago #

    Favicon is cached, clear browser's cache and see.

    To help it updated faster, manually load the favicon by visiting its url ( like http://example.com/favicon.ico ) so that you can check if it works too.

    ( Additional useful articles on the subject. )

    Everything you always wanted to know about touch icons
    http://mathiasbynens.be/notes/touch-icons

    rel="shortcut icon" considered harmful
    http://mathiasbynens.be/notes/rel-shortcut-icon

  3. Charlotte Muse
    Member
    Posted 1 year ago #

    Thank you, the only way to make the link work was to use the whole path from the media uploader in wp.

Topic Closed

This topic has been closed to new replies.

About this Topic