Display Post Divider In Between Posts

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <?php
  2. if (($wp_query->current_post + 1) < ($wp_query->post_count)) {   
  3. echo '<div class="post-item-divider">Post Divider</div>';
  4. }
  5. ?>

URL: http://css-tricks.com/snippets/wordpress/post-divider/

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.