Skip to content

Commit

Permalink
Merge pull request #16 from LauraRocks/hotfix/numeric-post-nav-fix
Browse files Browse the repository at this point in the history
add numeric_posts_nav query reset when returning early
  • Loading branch information
TeemuSuoranta committed Oct 4, 2019
2 parents 1bfc18e + 73f4145 commit 6e2b4a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/navigation/function-numeric-posts-nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ function aucor_starter_numeric_posts_nav($custom_query = null, $custom_paged_var
$clean_url = esc_url(remove_query_arg($paged_variable));

if ($max_num_pages <= 1) {
// reset previous global wp_query
if (!empty($wp_query_temp)) {
$wp_query = $wp_query_temp;
}
return;
}

Expand Down

0 comments on commit 6e2b4a6

Please sign in to comment.