Adsense
Displaying advertisements from Adsense with Ajax Load More
In this example:
Ajax Load More will insert Google Adsense advertisements directly into the Ajax results using the Call to Actions add-on.
Adsense and DFP advertisements can also be injected into single posts with the Single Posts add-on.
The following shortcode was used to create the Adsense example.
[ajax_load_more cta="true" cta_position="after:2" cta_theme_repeater="adsense.php"posts_per_page="4" images_loaded="true" preloaded="true" preloaded_amount="4" pause="true" pause_override="true" seo="true"]
The following Repeater Template was used to create the Adsense example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <li class="no-img ad-widget" style="width: 100%; padding: 10px; border: 2px dashed #eace2e; min-height: 0;"> <!-- Ad Slot --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-{PUB_ID}" data-ad-slot="{SLOT_ID}" data-ad-format="auto"> </ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- / Ad Slot --> </li> |