Two posts per repeat
-
Hi there!
I have to say that your plugin is pretty great. I’ve just installed it and it works like a charm. I have one issue/dilemma with it.
I’m trying to output two posts per div, while there is posts. So if I want to repeat 5 posts they would be outputted:
1 2 3 4 5
I tried using IF in the repeater template, but all I managed to do is to nest the posts one insde the other.
<?php $ajaxcounter = 0; if ( $ajaxcounter == 0 ) { ?><div class="home_doublehold"><?php } ?><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="home_doublehold_block"> <h2><?php the_title(); ?></h2> <p><?php the_excerpt(); ?></p> <p class="home_doublehold_more">Read entire article</p> </a><?php $ajaxcounter++; if ( $ajaxcounter == 0 || $ajaxcounter == 2 ) { ?></div><?php } if ( $ajaxcounter == 2 ) { $ajaxcounter = 0; } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Two posts per repeat’ is closed to new replies.