Header ad in custom header

Posted in: Newspaper
Post count: 500

1) I have positioned a header ad in my custom header. Desktop, tablet landscape and portrait views will show the ad from AdSense code placed in theme panel/ads/your header ad. But the ad does not show on mobile. Is this correct? I can only get the header ad to appear on mobile if I put the AdSense code in the custom ad field.

2) Do I need to use the div code around the AdSense code – either in theme panel/ads/your header ad or in the custom ad field, like this or can I leave it out?

<div class=”td-all-devices”>
<script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script&gt;
<!– JJ display horizontal 1 –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-7426344127145001″
data-ad-slot=”2925354814″
data-ad-format=”auto”
data-full-width-responsive=”true”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>

Thanks
Mark

Post count: 35449

Hi,

1. If you check the mobile version, you’ll see that there is no longer the header from there rest of view-ports (desktop, table) -> https://i.imgur.com/qJe6aVM.png therfore you’ll need to add a new row on mobile and set the ad in ad box.

2. that code is for banners/images also the one for your example is for all devices, but for adsense is no need for this extra code ->

Thank you!

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