Disable Adsense auto ads from header

Posted in: Newspaper
Post count: 26

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

Post count: 20685

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

Post count: 26

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.
Post count: 187

Yah. I am having problem also. I want it to STOP. Huge mistake activated this – had no idea. Even after going to adsense page and turning it off it continues to place ads on my site.

Any idea how to get it off the site?

THANKS! 🙂

Post count: 26

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.

Post count: 187

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.

Post count: 26

If the problem is in the header.php just download the theme files and replace this file.
But how did ads started appearing in your site if you didn’t place the code yourself?

  • This reply was modified 7 years by vasiliki.
Post count: 187

The previous web guy did it. Looks like disabling it on the AdSense site has worked. on my end at least. I hope my ads aren’t popping for people out there viewing my site!

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.