Using a Specific Favicon Per Wordpress Theme

Justin RainsWelcome! Thank you for visiting!
Please Subscribe to my full feed.

I really like using the favicon. Favicons are great for branding purposes as they show up as a graphic in the URL bar and also when a page is bookmarked. While themes do not change much in Wordpress I thought it would be nice to have a favicon that is specific for that theme. If I switch themes the new theme will need a favicon or nothing (or maybe the default favicon I haven’t tried that) will be shown. First create your 16×16 pixel favicon as described in this post and upload the file called favicon.ico to your BLOG/wp-content/themes/THEMENAME/images directory. Next up in the wordpress admin (or shell or text editor) open up the themes header.php file. Add this one line:

Download text file, WP (or server) won’t show the correct line.

You will then see your favicon in your browser window ONLY when browsing your site. Not in the wp-admin area because your theme is not being used in the admin area.

What do you think? Sure this is extra work as you could simply put this in the root folder but the geek in me likes the control. This could also be useful for distributing a free wordpress theme and branding.

Written on October 17th, 2008 Filed under Did you know?

Related Posts:



6 Comments »

  1. Gravatar

    What one line?

    Dennis Edells last blog post..So I’ve Started to Monetize - Link Love Style ;)

    Comment by Dennis Edell — October 18, 2008 @ 6:36 pm

  2. Gravatar

    @Dennis - I have fixed the code. Now it’s in an external text file. WP or the hosting server would not let me show the php code.

    Comment by Justin — October 21, 2008 @ 8:51 am

  3. Gravatar

    Favicon is a must for me! Cheers!

    shaxxs last blog post..Jalan Shaxx Beruang

    Comment by shaxx — October 21, 2008 @ 9:26 pm

  4. Gravatar

    Thought so, thanks for the link. :)
    Dennis Edells last blog post..Don’t Be Like Jack…

    Comment by Dennis Edell — October 22, 2008 @ 3:30 am

  5. Gravatar

    Nice one, there are already plugins to manage favicons but I always hate using plugins for stuff thats easy to do without because they are potential security risks.

    Comment by Soula Digital Design — November 10, 2008 @ 5:08 am

  6. Gravatar

    Nothing to do with Wordpress but you know what i really hate? When people are using Joomla and keep the default favicon, its so easy to change, and when i see a site with it i just think it looks so unprofessional and lazy.

    Comment by Web Design Liverpool — November 11, 2008 @ 8:27 am


RSS feed for comments on this post. TrackBack URI



Leave a comment




  • I Share

      Share Feed: Subscribe
  • Recent Visitors

  • Blogroll

  • Cool Stuff