Skip to content
This repository has been archived by the owner on Apr 21, 2018. It is now read-only.

Commit

Permalink
Don't output HTML for paging navigation if it's not needed. Fixes #20.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwight committed May 3, 2014
1 parent 4680467 commit ecbe4f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ function debut_add_customizer_css() { ?>
function debut_content_nav( $nav_id ) {
global $wp_query;

// Don't print empty markup if there's only one page.
if ( $wp_query->max_num_pages < 2 ) {
return;
}

$nav_class = 'site-navigation paging-navigation';
if ( is_single() )
$nav_class = 'site-navigation post-navigation';
Expand Down

0 comments on commit ecbe4f7

Please sign in to comment.