WordPress.org

Ready to get started?Download WordPress

Forums

Inserting a favicon in Twenty Ten child theme (6 posts)

  1. RedRunner
    Member
    Posted 3 years ago #

    Hey all,

    I'm having trouble getting my favicon to show... my bluehost favicon seems to show up no matter what.

    I've put the favicon.ico in my child theme image directory and added the following code to my function.php (part of the parent):

    function add_theme_favicon() { ?>
    <link rel=”shortcut icon” href=”<?php echo bloginfo(‘stylesheet_directory’) ?>/images/favicon.ico” >
    <?php }
    add_action(‘wp_head’, ‘add_theme_favicon’);

    But nothin... wondering if that code just isn't right to find the file??

    Any ideas?

    Thanks!

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    try:

    function add_theme_favicon() {
    echo '<link rel="shortcut icon" href="' . get_bloginfo('stylesheet_directory') . '/images/favicon.ico" >';
    }
    add_action('wp_head', 'add_theme_favicon');

    added the following code to my function.php (part of the parent):

    does this mean the function is added to functions.php of the parent theme?
    is the favicon.ico in the corresponding /images folder?

    does the linking code show in the html code in the browser? ('View' 'Source')

    if you post a link to your site, someone could have a look.

  3. RedRunner
    Member
    Posted 3 years ago #

    It has worked! Sorry - I must have needed to close and re-open my browser...

    Thanks so much for your help though.

  4. WAM1
    Member
    Posted 3 years ago #

    I cant find the 'Favicon Uploader' to add my favicon since I've changed to the Twenty Ten 1l.2 theme.

    When I was using Thesis 1.8 and it had 'Favicon Uploader'.

    But sadly now on the new theme it does not. Any easy way to do this?

    Debbi

  5. Anuradha Edirisuriya
    Member
    Posted 3 years ago #

    Yes, you can do it via theme editor. Add the above code to header.php and copy the favicon to theme directory.

  6. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    @WAM1:

    Don't hijack threads. You should start your own topic, since your issue is not the same as the OP's.

Topic Closed

This topic has been closed to new replies.

About this Topic