Hello,
I’ve been struggling with adsense integration, and I desperately need help.
So basically, I’d been using the theme’s ad insert functions to insert the adsense ads (1 top, 1 bottom, and 1 in-line). However, since there’s not much option for me to fine tune the ads through the theme’s ad inserts, I decided to get rid of those codes, and manually insert the ads on every single post without the use of any plugins or theme’s functions. So I have completed inserting those ads on every post through the html section of the editor.
But here’s the problem.
The ads don’t display all the time, and this is not the problem with the browser cache, or Google unable to find the right size for the ad placement. The ads show perfectly and always with other themes made by other companies. I have tested this with 5 different themes and also the 2017 theme. But it was just these two themes, newspaper and newsmag, that do not display the ads all the time.
Please have a look at the following image:
https://imgur.com/a/S8j1FIz
The code I inserted on the pages are as follows:
<div class=”ad-wrap”>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– post-top –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-xxxxxx”
data-ad-slot=”xxxxxxxx”
data-ad-format=”auto”
data-full-width-responsive=”true”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
And the css I applied to the ads’ divs:
.ad-wrap {margin-top: 25px; margin-bottom: 25px; padding: 0; line-height: 0 !important; text-align: center;}
.ad-top {width: 300px; height: 250px;}
.ad-middle {width: 300px; height: 250px;}
.ad-bottom {width: 300px; height: 250px;}
The link to my website is on the picture from the above,
and you can click on any of the posts on the main page to test out.
Thank you in advance!
One more question.
If you take a look at the following picture: https://imgur.com/a/oSmDSVh,
the ad is sticking out of the post container. How can I fix this, so that it fits inside the div all the time?
If you can please answer both questions, it would be appreciated!
Thanks.
Hello kpople,
Please notice that you only use the Ads section from Theme panel if you want to display the Ads in Top, Inline or Bottom section of your posts. First of all, you should read our documentation from here -> https://forum.tagdiv.com/newsmag-header-ads/ because there you will find out, how exactly you can set up your Ads. Also, for more details about how exactly you should use the Google Adsense, please check here -> https://support.google.com/adsense/answer/181947?hl=en&ref_topic=28893 the official Adsense documentation. Another alternative for you would be to use the AdRotate plugin to display your Ads.
Thanks for your understanding!
Hello,
Thank you for your reply.
Do you mean any ads manually inserted in the posts won’t show no matter what and that I have to use the theme’s ad section or ‘Adrotate’ plugin?
Is there absolutely no way to show manually inserted ads by editing some files?
Thanks!
Hi again,
I installed ‘Adrotate’ and tried inserting ads with the shortcode. But this doesn’t display the ads either. Same problem.
I tried with both ‘newsmag’ and the default wordpress theme.
Please advise.
Hello kpople,
You should not manually add the ads for each post. Use the Article Top, Inline and Bottom functionality from here -> https://www.screencast.com/t/RSSvtn6kwz9
Thanks.