Hi there. I use Google Adsense. How can I remove the header ads in mobile/tablet view? I want to see the header only and no ad.
I am not using AMP or the TagDiv mobile plugin and can’t because they both prevent the content in my pages from showing.
Current view:
I’d really like the ads above the header to be gone. I am fine with the desktop header ad.
Please help!
Hi,
The solution that I can offer is to use a custom css that will hide it from the header zone on mobile, the css is:
.td-header-sp-rec {
display: none!important;
}
This should be placed in the theme panel> custom code > advance css > phone – https://prnt.sc/x13Vx2tifJvC
I tried that, unfortunately, the ad on mobile still appears above the header after I added the code you provided.
Is there something else that I can try?
Actually, never mind. I spoke too soon. It works! Will this same code also work to prevent the header code on tablets?
Ok. I take that back. It does NOT work. (sorry for the back and forth)
Hi,
I just checked the website on mobile and now the header ad is no longer displayed – https://prnt.sc/M1nhiIw9UKIN
Yes, if you want to use the code for tablets too, then just copy and paste the same code in the iPad portrait section.
Thank you. You are correct. It has been working the last few days since we’ve added the code. Much appreciated!