Advertisement
lberelson

Site 3 - final pagination snippet

Aug 2nd, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. <?php if ($wp_query->max_num_pages > 1 ) : ?>
  2. <div id="nav-below" class="navigation">
  3. <?php pagination('Prev','Next'); ?>
  4. </div><!-- #nav-below -->
  5. <?php endif; ?>
  6.  
  7. *******************************
  8. The default WP pagination is designed to work on posts sorted by date, so 'Prev' would refer to earlier posts and 'Next' would refer to later posts.  I put in the default pagination because I know that it will work.  Now that we know that the other parts work, we can put in the custom pagination that came with the theme.
  9.  
  10. Replaced the pagination Mac wrote for testing the query post
  11. <?php if ($wp_query->max_num_pages > 1 ) : ?>
  12. <div id="nav-below" class="navigation">
  13.         <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Prev', 'custom3' ) ); ?></div>
  14.         <div class="nav-next"><?php previous_posts_link( __( 'Next <span class="meta-nav">&rarr;</span>', 'custom3' ) ); ?></div>
  15. </div><!-- #nav-below -->
  16. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement