-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsearch.php
62 lines (48 loc) · 2.17 KB
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* The template for displaying search results pages
* If you want to have this display with a sidebar, uncomment the sidebar out at the bottom.
* Add the class .page-template-sidebar-right or left to the main element
* Or just add the pull in sidebar
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package Ignition
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<header class="page-header layout-center-content text-center">
<div class="header-content container-fluid">
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'ignition' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php else : ?>
<h1 class="page-title"><?php _e( 'Nothing Found', 'ignition' ); ?></h1>
<?php endif; ?>
<div class="container-content">
<?php get_search_form(); ?>
</div>
</div>
</header>
<div class="container search-items">
<section class="card-grid">
<?php
while ( have_posts() ) : the_post();
ign_template('card');
endwhile; // End of the loop.
?>
</section><!-- .entry-content -->
<div class="container">
<?php
the_posts_pagination( array(
'prev_text' => '<span class="iconify" data-icon="carbon:chevron-left"></span><span class="screen-reader-text">' . __( 'Previous page', 'ignition' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'ignition' ) . '</span><span class="iconify" data-icon="carbon:chevron-right"></span>',
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'ignition' ) . ' </span>',
) );
?>
</div>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer();