Posted By

martias21 on 07/20/11


Tagged

wordpress navigation


Versions (?)

WordPress navigation: show link to the archives on the last page


 / Published in: PHP
 

URL: http://www.wprecipes.com/wordpress-tip-better-page-navigation

  1. <?php if ($paged > 1) { ?>
  2.  
  3. <?php if (get_next_posts_link() != NULL) {
  4. next_posts_link('&laquo; Older Entries');
  5. } else { ?>
  6. <a href="http://.../archives">&laquo; Site Archives</a>
  7. <?php } ?>
  8. <?php previous_posts_link('Newer Entries &raquo;'); ?>
  9.  
  10. <?php } else { ?>
  11.  
  12. <?php next_posts_link('&laquo; Older Entries'); ?>
  13. <?php previous_posts_link('Newer Entries &raquo;'); ?>
  14.  
  15. <?php } ?>

Report this snippet  

You need to login to post a comment.