Posted By

lancemonotone on 05/18/10


Tagged


Versions (?)

Wordpress Hide Empty Navigation Div


 / Published in: PHP
 

  1. /* in functions.php */
  2. function show_posts_nav() {
  3. global $wp_query;
  4. return ($wp_query->max_num_pages > 1);
  5. }
  6.  
  7. /* in template */
  8. <?php if (show_posts_nav()) : ?>
  9. <div id="nav-above" class="navigation">...</div>
  10. <?php endif; ?>

Report this snippet  

You need to login to post a comment.