Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created February 7, 2013 16:11
Show Gist options
  • Save INDIAN2020/4731987 to your computer and use it in GitHub Desktop.
Save INDIAN2020/4731987 to your computer and use it in GitHub Desktop.
post divider
/*
Add post divider in between two posts or more
Add this snippet right before the closing of the loop to auto insert a post divider “div” that you can style using the “post-item-divider” class.
*/
<?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