Add a favicon to your WordPress theme using wordpress hack

Sponsors

Just copy paste the following following lines to your function.php file.

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

if wp_head() function added in your header.php file, If that function not added then this hack will never work

logo

You may like following Articles!

This entry was posted in wordpress, wordpress api and tagged by Wordpress API. Bookmark the permalink.

About Wordpress API

API means Application Program interface. In Wordpress API we are giving all the information about wordpress API. We worked for many wordpress plugins and themes. We have expertise in PHP, Databases, Graphic Design, Ruby on Rails, Java, Wordpress, Drupal and many CMS. We always give you the best solutions about wordpress and other related topics in This Blog. We will give you always fresh tips and tricks and techniques about wordpress in this blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>