0

In my wordpress site favicon showing all browsers except google chrome would give direct URL link also but not working on chrome, i used the code like this

<link rel="icon" href="<?php echo get_template_directory_uri(); ?>/images/favicon.ico"  type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/images/favicon.ico" type="image/x-icon" />
Naveen J
  • 13
  • 6
  • Please have a look : https://stackoverflow.com/questions/16375592/favicon-not-showing-up-in-google-chrome – Abhishek Kumar Jul 25 '18 at 05:12
  • Are you sure you are not loading the website from cache? press Crtl+F5 in chrome to reload your site without using cache and check it again. – Mahdi Aryayi Jul 25 '18 at 05:13
  • thanks mahdi, i clear the cache and tried but still not working, can u pls check the website in your browser https://www.cloudnippon.com/ – Naveen J Jul 25 '18 at 05:31
  • try placing favicon in root folder not under theme..root folder means, the folder which contains wp-content, wp-admin etc and call it as href="" – charan kumar Jul 25 '18 at 05:37
  • Hi charan, in home page only favicon showing, but in other pages not showing – Naveen J Jul 25 '18 at 06:33

2 Answers2

1

Wordpress has its own Site Icon functionality.

Try this:

  • Go to wp-admin of your website.
  • In the left sidebar, Appearance --> Customize.
  • Customize will open in the left sidebar.
  • Go to the 1st option - 'Site Identity'
  • Set your Site Icon.

Now check your website again on Chrome.

Edit

Link your favicon directly in your header.

  • Upload your favicon.png in your public_html section via FTP or CPanel File Manager.

  • In your child theme, copy header.php from your main theme.

  • In the <head></head> section, add this code:

    <link rel="icon" href="YOURSITEURL/favicon.png">

Include the http:// / https:// in YOURSITEURL.

Hope this helps.

Community
  • 1
  • 1
Hamza Ahmad
  • 512
  • 2
  • 7
  • 32
0

I checked your site source and found there is issue that icons tag shows under body tag.

icon tag should be in head tag

Naveen J
  • 13
  • 6