Skip to content

Commit cf9ec04

Browse files
committed
Merge branch 'fix/search' into staging
2 parents 0a8d2b1 + 9b10603 commit cf9ec04

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

wp-content/themes/humanity-theme/includes/features/search/class-search-page.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public function get_wp_query(): ?WP_Query {
5858
return $this->query;
5959
}
6060

61-
$this->query = new WP_Query( $this->get_query_vars() );
61+
if ( get_query_var( 's' ) ) {
62+
$this->query = $GLOBALS['wp_query'];
63+
} else {
64+
$this->query = new WP_Query( $this->get_query_vars() );
65+
}
6266

6367
$search_page_id = absint( get_option( 'amnesty_search_page' ) );
6468

wp-content/themes/humanity-theme/includes/features/search/post-excerpt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function get_first_paragraph( string $html ): string {
2424

2525
libxml_use_internal_errors( true );
2626
$doc->loadHTML(
27-
mb_convert_encoding( $html, 'HTML-ENTITIES', 'UTF-8' ),
27+
$html,
2828
LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NOXMLDECL | LIBXML_NOERROR | LIBXML_NOWARNING
2929
);
3030
libxml_use_internal_errors( false );

wp-content/themes/humanity-theme/patterns/search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<div class="wp-block-group post-byline wp-block-post-date">
120120
<!-- wp:paragraph -->
121121
<p class="wp-block-paragraph">
122-
<time datetime="<?php echo esc_attr( get_the_modified_date( 'c' ) ); ?>"><?php echo esc_html( get_the_modified_date() ); ?></time>
122+
<time datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time>
123123
</p>
124124
<!-- /wp:paragraph -->
125125
</div>

0 commit comments

Comments
 (0)