Since a few weeks, the favicon of my webzine is no longer displayed, and this on the browser of my work, but also on my personal PC.
I do not think I have changed the configuration. I tried to re-upload it, to no avail.
In the Google Chrome Developer Console, there is an error on favicon.ico (404) but in the source code of the page, this URL is not called.
There are however two tag link with a rel = "icon" and the URL of the favicon, if I click on the links, the images are there.
The best way to add WordPress Favicon is adding favicon via
Appearance > Customize > Site Identity
. Create favicon image at least by512 x 512
and follow the path to navigate. Then upload the image inSite Identity
section.Save
it and you're done.Please follow this for more info.
This is due to a
div
markup which wrongly appears if thehead
section of your pages. Such markup should only be in thebody
.More details
Most browsers accept
body
-only markups inhead
. But Chrome has a particular behavior. When this happens, Chrome considers thehead
section to be closed. Therefore, followinghead
markups are actually considered to be in thebody
. And since favicon markups do not work when there are inbody
...This is why your favicon fails on Chrome but works on Firefox.
How to fix
Your first two
div
are around line 153, still in thehead
. As a hint, their ids arefb-root
andfb-customerchat
. That should help you spot which plugin is doing this.Should you disable this plugin, at least for now? Your choice.
You should also report this issue to the plugin developer. You must not be the only one impacted by this issue.
It seems you're using a PNG image, you can try to add attribute
type
.So your link would be something like :
<link rel="icon" href="yourpath" type="image/png">
EDIT : Plus, put your
.ico
file in the root of you website if it's not already done.