[wp-hackers] best way to insert data between posts

John Blackbourn johnbillion+wp at gmail.com
Mon Jul 4 14:22:24 UTC 2011


On 4 July 2011 13:35, fris <fris at fris.net> wrote:
> I know I Can modify the theme templates to insert data between posts with a
> counter
>
>
>
> Example ads every 3rd post.
>
>
>
> But im looking to do this via a plugin, what would be the best way to do
> this?

You could try the 'the_post' hook which fires at the beginning of each
iteration of the loop. It's called by the_post() so anything you
output during that hook will be placed where your call to that
function is.

John


More information about the wp-hackers mailing list