Skip to content

Instantly share code, notes, and snippets.

@intelliweb
Created August 3, 2013 16:26
Show Gist options
  • Save intelliweb/6147031 to your computer and use it in GitHub Desktop.
Save intelliweb/6147031 to your computer and use it in GitHub Desktop.
Add divider between WordPress posts, skipping the last one. Source: http://css-tricks.com/snippets/wordpress/post-divider/
<?php
if (($wp_query->current_post + 1) < ($wp_query->post_count)) {
echo '<div class="post-item-divider">Post Divider</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment