Hello everyone, on this occasion I will share how to fix in-feed ads that do not appear when a blog uses the load more feature.
If your blog uses infinite scroll and you place in-feed ads, when the Load More button is clicked, the in-feed ads often do not load along with the new content.
For those using infinite scroll from dte.web.id, in order for
in-feed ads to load properly, the
window.adsbygoogle script must be triggered again.
Make In-Feed Ads Appear When Using Load More
- Go to Blogger >
Theme>Edit HTML. - Copy the JavaScript below and place it
above the
</body>tag or<!--</body>--></body>. - After that, click save.
<script>
/*<![CDATA[*/
if (typeof infinite_scroll !== "undefined") {
infinite_scroll.on("load", function () {
(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle = window.adsbygoogle || []).push({});
});
}
/*]]>*/
</script>
Info!
If your in-feed ads are enabled only on mobile view, you must also wrap the
script above with a mobile conditional tag to avoid errors.
That’s all I can share this time about fixing in-feed ads not appearing when using load more . Thank you for visiting, and I hope this is useful.