Support » Fixing WordPress » Inserting a favicon in Twenty Ten child theme

  • 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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    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.

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

    Thanks so much for your help though.

    WAM1

    (@wam1)

    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

    Anuradha Edirisuriya

    (@anuradhaedirisuriya)

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

    Chip Bennett

    (@chipbennett)

    Theme Review Admin

    @wam1:

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inserting a favicon in Twenty Ten child theme’ is closed to new replies.