2019-05-23 12:30:31 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template for displaying search results pages.
|
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
|
|
|
|
*
|
2021-07-10 17:13:24 -04:00
|
|
|
* @package AdamPion73k
|
2019-05-23 12:30:31 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
get_header(); ?>
|
|
|
|
|
2021-07-10 17:13:24 -04:00
|
|
|
<main class="container d-flex justify-content-center">
|
|
|
|
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3">
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-07-10 17:13:24 -04:00
|
|
|
<?php if (have_posts()) : ?>
|
2021-08-04 16:40:42 -04:00
|
|
|
<h1 class="text-muted fst-italic mb-4 tek-border-bottom-gray-dashed">
|
|
|
|
<?php echo 'Search results for: “' . esc_html( get_search_query() ) . '”'; ?>
|
|
|
|
</h1>
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-07-10 17:13:24 -04:00
|
|
|
<?php
|
|
|
|
while ( have_posts() ) :
|
|
|
|
the_post();
|
|
|
|
echo get_template_part( 'content-templates/content', 'article' );
|
|
|
|
endwhile;
|
2021-08-04 16:40:42 -04:00
|
|
|
|
|
|
|
// output listing pagination if not singular
|
|
|
|
if (!is_singular()) :
|
2021-07-10 17:13:24 -04:00
|
|
|
?>
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-07-10 17:13:24 -04:00
|
|
|
<nav class="d-flex justify-content-between" aria-label="Page navigation">
|
2021-08-04 16:40:42 -04:00
|
|
|
<div class="nav-previous alignleft">
|
|
|
|
<?php
|
|
|
|
$txt = inline_svg( 'mdi-chevron-left', array( 'div_class' => 'icon baseline me-1' ) ) . 'Older';
|
|
|
|
next_posts_link( $txt ); ?>
|
|
|
|
</div>
|
|
|
|
<div class="nav-next alignright">
|
|
|
|
<?php
|
|
|
|
$txt = 'Newer' . inline_svg( 'mdi-chevron-right', array( 'div_class' => 'icon baseline ms-1' ) );
|
|
|
|
previous_posts_link( $txt ); ?>
|
|
|
|
</div>
|
2021-07-10 17:13:24 -04:00
|
|
|
</nav>
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-08-04 16:40:42 -04:00
|
|
|
<?php endif;
|
2021-07-10 17:13:24 -04:00
|
|
|
else :
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-08-04 16:40:42 -04:00
|
|
|
echo '<h1 class="text-muted fst-italic mb-4 tek-border-bottom-gray-dashed">Search: nothing found</h1>';
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-08-04 16:40:42 -04:00
|
|
|
printf( 'Sorry, no results for “%s”',
|
2021-07-10 17:13:24 -04:00
|
|
|
esc_html( get_search_query() )
|
|
|
|
);
|
|
|
|
endif;
|
|
|
|
?>
|
2019-05-23 12:30:31 -04:00
|
|
|
|
2021-07-10 17:13:24 -04:00
|
|
|
</div>
|
|
|
|
</main>
|
2019-05-23 12:30:31 -04:00
|
|
|
<?php
|
2021-08-04 16:40:42 -04:00
|
|
|
get_footer();
|