Recently Google changed behavior of responsive ads on phones.
Now they use full screen width by default.
This is the new code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display: block;"
data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxxx"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
If the attribute data-full-width-responsive is missing or set to true the responsive ad will occupy full screen width.
You need to set it to false (simply add the line if it is missing):
data-full-width-responsive="false"
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display: block;"
data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxxx"
data-ad-format="auto"
data-full-width-responsive="false"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
You can also use built in code generator to set Full width to false:
https://adinserter.pro/documentation/adsense-ads#code-generator
I see. My code don’t have that line. And its not a box but fluid. Only one from my all 6 had similar code to this.
Is that just enough if I add this line to code?
If I use generator, firstly should I make ad# on my adsense account?
Thank you very much!
Yes, it should be enough – this is the easiest way.
With the generator you can import existing code, change responsive width setting and then generate back the code.
Hey,
It’s work fine now! Thank you!!!!!
You are welcome 🙂
If you like the plugin I would appreciate if you could write a short review here on WP:
https://wordpress.org/support/plugin/ad-inserter/reviews/#new-post
Thank you!