From 675a3a745179a915f924c2eaeb0c6ca74ce04e3a Mon Sep 17 00:00:00 2001 From: Stefan Bohacek Date: Wed, 18 Nov 2020 11:25:29 -0500 Subject: [PATCH] Hide pagination when there are no results. --- search.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/search.php b/search.php index 17e9f9a..76de128 100644 --- a/search.php +++ b/search.php @@ -46,11 +46,12 @@ found_posts > 0){ ?> + if ($wp_query->found_posts > 0){ + get_template_part( 'pagination' ); + ?>

Not quite what you're looking for?