Skip to content

Commit

Permalink
add numeric_posts_nav query reset when returning early
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraRocks committed Sep 20, 2019
1 parent 5ad818d commit 73f4145
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 73f4145

Please sign in to comment.