WordPress.org

Ready to get started?Download WordPress

Forums

Magazine Basic
How to add a favicon (3 posts)

  1. costrelas
    Member
    Posted 1 year ago #

    Is this the easy way to add a favicon to my site or is there a easier way??Have no idea about coding.

    <link rel="shortcut icon" href="favicon.ico">

    Many thanks

  2. iampng
    Member
    Posted 1 year ago #

    Upload your favicon into the root directory (http://www.yourwebsitename) and add the following code to your theme's function.php file

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

    this worked for me or you could go to the codex http://codex.wordpress.org/Creating_a_Favicon

  3. costrelas
    Member
    Posted 1 year ago #

    That did it
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.