How to switch off Adsense code modification by Newspaper

Posted in: Newspaper
Post count: 12

Hi. Google provides webmasters with responsive code of Adsense and native type of ads.
Meantime I have checked the html code of the content page (Newspaper template 8.7) and have noted, that the template had modified the original Adsense code. How to switch off this Adsense code modification by Newspaper template?

Post count: 12

Is anybody here?

Post count: 23312

Hello avianews,

Please notice that’s the default Ads available system for the website. If you want to use other ads, you should check the documentation from here -> https://forum.tagdiv.com/using-other-ads-non-adsense-ads/ If is not what you mean, provide more details but notice that’s the single Ad system available in the theme, sorry!

Thanks for the message!

Post count: 12

Hi.
For example
Original code

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<ins class=”adsbygoogle”
style=”display:block; text-align:center;”
data-ad-layout=”in-article”
data-ad-format=”fluid”
data-ad-client=”ca-pub-XXXXXXXXXXXXXXXXX”
data-ad-slot=”XXXXXXXXXXX”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
I would like to use the original code above, not modified code. What should I do?
The code on the page, after the Newspaper template has modified it, below

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script><div class=”td-g-rec td-g-rec-id-content_inline td_uid_2_5a86f5a6ee5e9_rand td_block_template_1 “>
<script type=”text/javascript”>
var td_screen_width = window.innerWidth;

if ( td_screen_width >= 1140 ) {
/* large monitors */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:468px;height:60px” data-ad-client=”ca-pub-xxxxxxxxxxxxxxxxxxxxxxx” data-ad-slot=”xxxxxxxxxxxxxxxxxxxx”></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}

if ( td_screen_width >= 1019 && td_screen_width < 1140 ) {
/* landscape tablets */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:468px;height:60px” data-ad-client=”ca-pub-xxxxxxxxxxxxxxxx” data-ad-slot=”xxxxxxxx”></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}

if ( td_screen_width >= 768 && td_screen_width < 1019 ) {
/* portrait tablets */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:468px;height:60px” data-ad-client=”ca-pub-xxxxxxxxxxxxxx” data-ad-slot=”xxxxxxxxxxxx”></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}

if ( td_screen_width < 768 ) {
/* Phones */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:320px;height:50px” data-ad-client=”ca-pub-xxxxxxxxxxxxxxxxxxxx” data-ad-slot=”xxxxxxxxxxxx”></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</div>

Post count: 20688

Hi,

The theme will automatically search the ad in the Google system and display the right size on your ad spot, if the ad size is on auto
https://www.screencast.com/t/1UP95oZoe
You can choose specific ad sizes if you want to. Or implement the ads using a plugin, if you require more control over the ads. The Adrotate plugin is recommended by theme users in this case.

Thanks

Post count: 17

My ads are set to auto and definitely NOT displaying in correct size… see ads under top image and bottom of article https://agedcareweekly.com.au/fifth-national-elder-abuse-conference-in-sydney/
see:

Post count: 20688

I see them like this at the moment – https://www.screencast.com/t/m9YbVAp3PgG
If you want different sizes select them by device in the theme panel, and they should be delivered accordingly
https://www.screencast.com/t/o9esBjsSM
Or maybe consider using a different ad implementation, the Adrotate plugin is recommended by theme users who require more advanced control over the ads.

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