<?php if( ($wp_query->current_post + 1) < ($wp_query->post_count) ) { // Do something if it's the last post. }; ?>
Source : http://wp-snippets.com/check-if-last-post/
You must be logged in to post a comment.
Leave a Reply