Skip to content

Commit

Permalink
Hide pagination when there are no results.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbohacek committed Nov 18, 2020
1 parent 28b7a87 commit 675a3a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@
<?php }

get_template_part( 'loop' );
get_template_part( 'pagination' );



if ($wp_query->found_posts > 0){ ?>
if ($wp_query->found_posts > 0){
get_template_part( 'pagination' );
?>
<h3>Not quite what you're looking for?</h3>
<?php }?>
<div class="container">
Expand Down

0 comments on commit 675a3a7

Please sign in to comment.