WowPress-Tailwind/theme/search.php

53 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2024-04-15 16:00:49 +02:00
<?php
/**
* The template for displaying search results pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package WowPress
*/
get_header();
?>
<section id="primary">
<main id="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
printf(
/* translators: 1: search result title. 2: search term. */
'<h1 class="page-title">%1$s <span>%2$s</span></h1>',
esc_html__( 'Search results for:', 'wowpress' ),
get_search_query()
);
?>
</header><!-- .page-header -->
<?php
// Start the Loop.
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content/content', 'excerpt' );
// End the loop.
endwhile;
// Previous/next page navigation.
wowpress_the_posts_navigation();
else :
// If no content is found, get the `content-none` template part.
get_template_part( 'template-parts/content/content', 'none' );
endif;
?>
</main><!-- #main -->
</section><!-- #primary -->
<?php
get_footer();