wordpress snippets last updated   : April 22, 2014
we now have 631 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 →
jqsnipp.com | we just launched jquery snippets website