There are a couple of plugins and themes that support infinite scroll so that your visitors can read more articles on the same page just by scrolling down.
Advanced Ads does not inject ads into this content by default, though you can change that.
Since there is no technical standard, the solution to show ads can vary. This page covers our current knowledge to show ads in AJAX-loaded content.
Table of Contents
How to enable AJAX-loaded ads?
These are a few solutions to show ads in AJAX-loaded content.
Disable ads on secondary queries
Disable the Disable ads on secondary queries option in Advanced Ads > Settings > General > Disable Ads. If enabled, it prevents ads in content loaded using AJAX
Enable Secondary Queries
In case you are using the General Conditions in the Display Conditions on the ad edit screen then make sure to enable Secondary Queries.
Set Unlimited ad injection
The Unlimited ad injection setting in Advanced Ads > Settings > General > Content injection allows you to enable ads on archive pages and outside of “single pages”. Set this option to -1 or anything above 0 to enable ads in AJAX-loaded content and infinite scroll.
Developers, set is_singular() and in_the_loop()
Developers of AJAX-loading plugins or themes should make sure that is_singular() and in_the_loop() return true in their content. You could add something like this to your loop:
global $wp_query; $wp_query->is_single = true; $wp_query->is_singular = true; $wp_query->in_the_loop = true;
Features based on our Cache Busting are likely not working. These are especially
- Ad groups that rotate every x seconds
- Lazy Load
Cache Busting and Lazy Load are not needed for AJAX-loaded content since that is what is already happening with this technique.
There is still a chance that your ads are not injected into AJAX-loaded content due to an issue that could also happen to normal content. Please check this general list.
It is possible that Display and Visitor Conditions are not working for ads in AJAX-loaded content. We would like to check individual solutions. Please contact us.
Tested plugins and themes
These are plugins and themes we tested the above solutions on.
- AJAX Load More plugin: set Unlimited ad injection and allow ads in Secondary Queries to show ads