WORDPRESS – INSERT AD CODE AFTER X NUMBER OF POSTS – CODE

0 98

In this tutorial I’d like to share you how we can add ad code after x number of posts in custom query or in pagination, mostly as a blog author we choose single, page and sidebar to display our ads, right after the title or after the post content but if you’d like to display ads in many different places to maximize ad revenue then this tutorial is right for you folks.

Custom Query Code

On Pagination

To add code on navigation, here’s how.

On sub-pages we can simply add the below code to get current paged string, actually we really need the code below to get current paged number and use in pagination.

If you think you have a good solution out there, feel free to share.

You might also like More from author

Leave A Reply

Your email address will not be published.