how to add a favicon to your wordpress blog

how to add a favicon to your wordpress blog

We all know what is favicon logo. WordPress tutorial, how to add a favicon to your wordpress blog. In wordpress theme you can easily add the favicon logo using following code and put in functions.php file

how to add a favicon to your wordpress blog

you just need to open your functions.php file and put following code in that file.

function childtheme_favicon() { ?>
<link rel="shortcut icon" href="<?php echo bloginfo('stylesheet_directory') ?>/images/favicon.png" >
<?php }
add_action('wp_head', 'childtheme_favicon');
how to add a favicon to your wordpress blog
how to add a favicon to your wordpress blog

Note: your favicon.ico file need to placed under theme->images folder. then only this code will work

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.