Mobile ads load on AMP pages

Posted in: Newspaper
Post count: 15

Hello,

We have a strange issue on the site. When we add an ad code within a <div> via the theme’s mobile ads it loads on AMP pages. For example, in theme settings -> Mobile theme -> Header ad we place an ad code within a div (to solve Cumulative Layout Shift issue). So it would be something like <div style=”height:313px;”>[AD CODE]</div> inside the theme’s Header ad field. It works fine on mobile version. But when you open an AMP version of the site, we have a blank space in the header as the ad is not AMP so it does not appear. How can we prevent mobile ads from being loaded on AMP pages?

We have AdSense AMP ads enabled via the theme’s settings and that would fine if the blank mobile ads were not being loaded as well.

Post count: 15

Sorted. Nevermind.

Post count: 21065

Hello @talkbasket!

I’m glad you have managed to solve the issue.
Let me know if you need further assistance.

Have a nice day!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.