wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Conditionally display content on last post

wordpress snippet

Adding this snippet within the loop of your wordpress theme will let you display something only if it is on the last posts.

snippet :  PHPcopy
<?php if( ($wp_query->current_post + 1) < ($wp_query->post_count) ) { ?>
   <b>last post</b>
<?php } ?>
source →

Did you like this post? If so please share it with your friends. Thanks!