How to Add Favicon to WordPress Site

Add Tool

Add Favicon to WordPress Site


Add Favicon to WordPress Site

Accourding to codex.wordpress.org A favicon is typically a graphic 16 x 16 pixels square and is saved as favicon.ico in the root directory of your server. You can use a favicon with any WordPress blog on a web server that allows access to the root directories.

There are many ways to add favicon to your website. Hear i will inform your about two way to add favicon to your wordpress site.

  1. using header.php file
  2. using functions.php file.

Add Favicon through header.php file

If want to create a favicon by using an online service, you can do it from Faviconer.com

After creating your favicon or Favorite icon you need to upload it to your root directory and add a php code in your header.php file. So add the following code below the <head> HTML tag.

<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" />

This codes will be displayed your favicon on your web browser.

Add Favicon through functions.php file

Just paste the following into your function.php file, save it, and you're done.

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

Don't forget to change the favicon url if needed. Also, please note that if the wp_head() function haven't been implemented in your theme, this recipe will not work.


Tags: Blogging, create favicon, favicon, favicon create, functions.php, how to add favicon to WordPress, WordPress, WordPress favicon
Payza

About Masum Billah

Add Favicon to WordPress Site 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools


SIGN UP TO GET UPDATE TO YOUR INBOX




Discuss about: How to Add Favicon to WordPress Site


adf.ly