Here’s my current code:
<?php
$mvp_posts_num = esc_html(get_option('mvp_posts_num'));
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts(array( 'posts_per_page' => $mvp_posts_num, 'paged' => $paged ));
if (have_posts()) :
while (have_posts()) : the_post();
?>
<li class="infinite-post">
This is where post summaries will be displayed.
</li>
<?php
endwhile;
endif;
?>
This is basically repeating the class continuously down the page. However, after every 3, I want to add this:
<div class="post-info-name left relative"></div>
I know how to do this with foreach
statements but this is for a WordPress theme and it looks like it’s something a bit different that’s needed.
I’m okay doing this with PHP or CSS, whatever is best.
Any help would be greatly appreciated.
This is fairly simple
You could try: