| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying search results pages |
|---|
| 4 | * |
|---|
| 5 | * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result |
|---|
| 6 | * |
|---|
| 7 | * @package shoper |
|---|
| 8 | */ |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | get_header(); |
|---|
| 12 | /** |
|---|
| 13 | * Hook - shoper_container_wrap_start |
|---|
| 14 | * |
|---|
| 15 | * @hooked shoper_container_wrap_start - 5 |
|---|
| 16 | */ |
|---|
| 17 | do_action( 'shoper_container_wrap_start'); |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | if ( have_posts() ) : ?> |
|---|
| 21 | |
|---|
| 22 | <header class="page-header shoper-header-block"> |
|---|
| 23 | <h1 class="page-title"> |
|---|
| 24 | <?php |
|---|
| 25 | /* translators: %s: search query. */ |
|---|
| 26 | printf( esc_html__( 'Search Results for: %s', 'shoper' ), '<span>' . get_search_query() . '</span>' ); |
|---|
| 27 | ?> |
|---|
| 28 | </h1> |
|---|
| 29 | </header><!-- .page-header --> |
|---|
| 30 | |
|---|
| 31 | <?php |
|---|
| 32 | /* Start the Loop */ |
|---|
| 33 | while ( have_posts() ) : |
|---|
| 34 | the_post(); |
|---|
| 35 | |
|---|
| 36 | /** |
|---|
| 37 | * Run the loop for the search to output the results. |
|---|
| 38 | * If you want to overload this in a child theme then include a file |
|---|
| 39 | * called content-search.php and that will be used instead. |
|---|
| 40 | */ |
|---|
| 41 | get_template_part( 'template-parts/content', 'search' ); |
|---|
| 42 | |
|---|
| 43 | endwhile; |
|---|
| 44 | |
|---|
| 45 | the_posts_navigation(); |
|---|
| 46 | |
|---|
| 47 | else : |
|---|
| 48 | |
|---|
| 49 | get_template_part( 'template-parts/content', 'none' ); |
|---|
| 50 | |
|---|
| 51 | endif; |
|---|
| 52 | |
|---|
| 53 | /** |
|---|
| 54 | * Hook - shoper_container_wrap_end |
|---|
| 55 | * |
|---|
| 56 | * @hooked container_wrap_end - 999 |
|---|
| 57 | */ |
|---|
| 58 | do_action( 'shoper_container_wrap_end'); |
|---|
| 59 | get_footer(); |
|---|
| 60 | ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.