Hi I was just approved for Google adsense.
I placed the code in header.php on child theme and created a sidebar ad. So when I was approved I see my sidebar ad and an ad in header which is ugly for my site. When I remove the code from header.php the header ad stops showing, which is good (I tried disabling header ads from the theme panel but is still showed).
Now my problem is that google wants the code in header.php so I am afraid that once I remove it the sidebar ads will stop working too.
Is there a way to stop adsense ads showing in header?
Thank you
Hi,
I believe it is required by Adsense that you place a verification code in the theme header between the head tags, but that is not an ad code. It will not appear anywhere. So if you use only a sidebar ad, that would be the only one to display.
What exactly is happening on your website?
Thanks
Hi sorry for the late answer. I was trying to figure this out with Google.
Turns out that I don’t have a verification code because I have a Hosted adsense account (from youtube) so not realizing this I placed the auto ads code in the header.php and autoads stared appearing everywhere on my website.
Thanks for your time
-
This reply was modified 8 years by
vasiliki.
Hi bobbymc
I don’t know if this will work for you, but I removed the code from header.php altogether.
Then in my adsense account under Ad Units I created ads with specific size etc.
Each ad unit gives you a code which I used in the Theme panel and created ads according to the Newspaper documentation.
After 1 or 2 days ads started showing on my site.
After days of searching I still haven’t found any specific answer from google or the net if this header code is essential but ads are showing so I stopped searching.
Thanks, I appreciate the advice.
I’m having the opposite problem I don’t want any ads on my site from google and they suddenly started popping up.
I can see the code script when I “view page source” in chrome. But can’t find it to erase it in the WordPress editor. Very frustrating.
I have never used the editor before so maybe I am doing it wrong when looking for it. Again. Super frustrating.
