check for last post in while loop?
-
say i have 3 posts and i’m displaying them. i want to add a
<hr>under each one on 2 conditions.
1. if there is only 1 post being displayed do not show the<hr>
2. if there is more than 1 posts displayed show it between them but not on the last one.i always want the last returned post to NEVER display the
hrunder it.i have this working in the loop.php page like this
if(($count >= 1) && (($wp_query->current_post +1) !== ($wp_query->post_count))) {but i’m not sure how to make it work in my custom theme file using this plugin. any advice?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘check for last post in while loop?’ is closed to new replies.