Return to Snippet

Revision: 26985
at May 18, 2010 08:45 by lancemonotone


Initial Code
/* in functions.php */
function show_posts_nav() {
	global $wp_query;
	return ($wp_query->max_num_pages > 1);
}

/* in template */
<?php if (show_posts_nav()) : ?>
        <div id="nav-above" class="navigation">...</div>
<?php endif; ?>

Initial URL

                                

Initial Description

                                

Initial Title
Wordpress Hide Empty Navigation Div

Initial Tags

                                

Initial Language
PHP