• I’m using a randomizer plugin to display content and it uses a PHP echo in the loop. I was wondering if there’s a way to set it so that I can show this content after every other (alternating) posts?

Viewing 1 replies (of 1 total)
  • Thread Starter ladycrow

    (@ladycrow)

    I have found I can do this using an if statement and post count but I’d like to use a little less code.

    For example

    <?php if ($count==2) { echo getad('ads'); } ?>

    But if I want something to appear after all the even posts (and I display up to 10 posts a page) that’s 5 repetitions I need to use.

    Is there a way to specify after the ‘even’ posts?

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Content After Every Other Post’ is closed to new replies.