From 9d1ec3b04691ed163fd969a81ca69abe133d6a14 Mon Sep 17 00:00:00 2001 From: Lee Maguire Date: Thu, 6 Mar 2025 12:43:12 +0000 Subject: [PATCH 1/3] Whitespace and i18n --- templates/search.php | 53 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/templates/search.php b/templates/search.php index c0a0c06b..f354381e 100644 --- a/templates/search.php +++ b/templates/search.php @@ -1,26 +1,27 @@ -
-

Search results for

- - - - -
> -
-

- - -
- - -
- - - -
-

No results found on .

-

Please try searching again using different words or try this search on GOV.UK.

-
- - +
+

Search results for

+ +
> +
+

+ +
+ + +
+ +
+

.

+

GOV.UK.

+
+ Date: Thu, 6 Mar 2025 12:47:06 +0000 Subject: [PATCH 2/3] Only show post metadata on posts Searches include types othet than posts - which will have missing metadata. Only use the metadata template if the entry is a post. Example the following will include the category events https://accessibility.blog.gov.uk/?s=Events --- templates/search.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/search.php b/templates/search.php index f354381e..87045c7b 100644 --- a/templates/search.php +++ b/templates/search.php @@ -8,7 +8,9 @@

From 691c7692242756dc6238c97b5b3a0ae62d81f9f1 Mon Sep 17 00:00:00 2001 From: Lee Maguire Date: Thu, 6 Mar 2025 12:51:29 +0000 Subject: [PATCH 3/3] linting fix --- templates/search.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/search.php b/templates/search.php index 87045c7b..9c9dcfbd 100644 --- a/templates/search.php +++ b/templates/search.php @@ -8,12 +8,12 @@

+ if (is_single()) { + get_template_part('templates/entry-meta'); + } + if (has_post_thumbnail()) { + the_post_thumbnail('large'); + } ?>