ThemeShaper Forums » Acamas

favicon

(3 posts)
  1. How would I add a favicon? Assuming I already created one, where would I edit, upload, etc.
    Thank you.

    Posted 10 years ago #
  2. Hi,

    Try and add the following code to functions.php file in your theme and upload the favico to the root of your theme (don't forget to back-up the file before working with it and add <?php and ?> tags)

    function fav_scripts() {
    global $siteurl;
    if (empty($siteurl)) $siteurl = get_settings('siteurl');
    $favurl = $siteurl.'/'.'';

    echo '<link rel="shortcut icon" href="'.$favurl.'favicon.ico" />' ;
    }

    add_action('wp_head', 'fav_scripts');

    PS: I took this code from http://www.altamentedecorativo.com/stars-and-stripes/ child theme so if you need to look exactly how that was implemented you can always download it!

    Posted 10 years ago #
  3. Thank you, I will try that.

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.