How, thru WordPress 2.2, can I place banners so that one might appear below 1st post down, another one appear below 5th post down, another appear below 9th post down, for example and etc.? The plug is used which shows most recent post at full length, while each older one shows about 20 -50 words then “Read More” link to the respective full post.
For static html pages the answer is very clear. But wordpress delivers dynamic pages, looping from first / most recent post, thru the rest to end of list, or end of current page length. How do I intervine into locations inside that data base query stream?
You’d need to edit the relevant template file and first set up some sort of post counter before The Loop begins which can then be incremented during each loop. Then it’s just down to adding an if/elseif statement within The Loop to test the post counter value and render the relevant code at post 5, post 9 etc.
By the sounds of it, the first post isn’t part of the main Loop. Maybe is being pulled using get_posts? If so, it should be fairly simple to add the first banner code between this and the main page Loop.
Viewing 1 replies (of 1 total)
The topic ‘Insert a few items between some posts?’ is closed to new replies.