This should be simple :)
I have a front page that displays the xxx number of most recent posts. How can I exclude every even number post? That way with each single new post it would appear that the entire site had changed.
This should be simple :)
I have a front page that displays the xxx number of most recent posts. How can I exclude every even number post? That way with each single new post it would appear that the entire site had changed.
Try something like:
<?php $my_count=0;
if (have_posts()) : while (have_posts()) :
$my_count++;
if( $my_count % 2 ) == 0 continue;
the_post(); ?>That was quick! Thanks
This topic has been closed to new replies.