How to add favicon in WordPress

The favicon is an icon used to represent the website or webpage as shortcut icon or bookmark icon. A website can contain one or more types of favicon. You can use png, JPG images also as a favicon. But the most common type is ico. It’s a small icon with 16*16 PX size. Some website provide an option to create your favicon. You can also create a favicon with .Ico.

There is following code through you can add a favicon to your WordPress website. For this you should follow the below steps:

  1. Upload favicon in template directory through FTP.
  2. Open header.php file which exists in your template directory.
  3. Add below code in header.php and upload header.php again.
 <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" /> 

In case if you have no FTP access then go on Appearance and click on Editor. Click on header.php to open and paste below code and click on “Save changes”.

 <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" /> 

Leave a Reply

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