The Posts Lists placement that comes with Advanced Ads Pro allows you to inject ads between posts on post list pages like home, categories, tags, or any other page with a list of multiple posts.
Table of Contents
How to inject ads between posts on archive pages
You find this placement under Advanced Ads > Placements. Choose the Post Lists placement type when creating a new placement. Afterward, please enter a name for this placement and save it.
After saving, select the post index before which the ad should appear.
E.g., if you want to display the ad between the second and the third entry of the archive page, select “3” here.
Secondary Loops & AJAX calls
If your theme or any other plugin creates post lists aside from the default WordPress loop, you can enable the Secondary Loops option in the additional placement options.
This feature would inject ads in those loops and AJAX-loaded content but could lead to showing ads in multiple other places.
This tutorial shows an example of integrating a post list placement in the Pocono theme.
Targeting ads to particular post lists pages
Post Lists pages behave differently than single pages and posts. For example, you can control ads on pages or posts using the tag or category display condition.
But suppose you want to target an ad to an archive page for posts with a specific tag or category. In that case, you need to use the appropriate archive display condition, e.g., archive category or archive tag, to ensure correct ad targeting.
Important notices
The post lists injection is bound to your template’s the_post() function. This function is typically included in themes, but your theme developer might choose to use a workaround.
To place an ad between posts, in this case, you can:
- ask the theme developer for advice
- use this code snippet to inject a manual placement
- use the Custom Position placement.