Archived topic
old favicon shows on homepage
11 replies · Started by kiant123 on April 14, 2022
Hi,
I changed my favicon a while back but i've noticed that on my home page and category pages the old favicon is still showing.
Do you know why this is happening?
Hi there,
This is the problem i see when inspect your home page:
https://www.screencast.com/t/WiUV9uiEal31
those codes i bordered in red should be in the <head> of the site. They can bust out of there if some broken code is injected into the wp_head and the most likely culprit is that mediavine element ( green arrow in image ).
How was that code added to the site ?
Hi David,
I put in that Mediavine code via a hook. The code is to block ads from appearing on my homepage and category pages.
How would you recommend fixing this?
thanks
Hmmm... do you have any other hooked in codes ?
There's no other inserted codes into that hook. That hook only contains the Mediavine code.
I do have other hooks created for my site with code in it. I've attached a screenshot with some examples.
Try changing the HTML from:
<div id="mediavine-settings" data-blacklist-all="1"></div>
to:
<div id="mediavine-settings" data-blacklist-all="1"><!-- remove mediavine --></div>
i've placed that new code in my hook, but it doesn't appear to have changed anything.
What happens if you temporarily disable ( set to Draft ) that hook ? It should remove that HTML, and that will help eliminate if that is the cause of the break.
Yes, that did work. The favicon now shows.
However, i'd still like to get this Mediavine code in somehow to block ads on this page.
What do you suggest?
Thanks for your help so far!
Oh my i must be having one of those moments lol The answer is staring me in the face.
Change the Hook to wp_body_open
instant fix!
Thanks a lot for your help!
Glad to hear that!