Archived topic
If I insert a single responsive ad unit, my entire site is filled with Adsense
1 reply · Started by Javier on April 16, 2020
Hello, I have a problem with Adsense ads. I want to place ads in certain spaces on my site with the Elements positions. However, by placing a single ad, everything is filled with advertisements.
I have just created a block, however my site shows multiple ads.
How can I control where I want the advertisements to be displayed. I would like to show ads in only 4 positions.
Thank you
This is the code I have inserted:
ELEMENTS - HOOK - INSIDE CONTAINER - DISPLAY INTIRE SITE
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- nside Container -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxx"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Hi there,
you can see the various Hooks here:
https://docs.generatepress.com/article/hooks-visual-guide/
If you look at the Posts hook you will see that some exist within each article. You will have to avoid using those hooks.