-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
60 lines (47 loc) · 2.02 KB
/
Copy pathsearch.php
File metadata and controls
60 lines (47 loc) · 2.02 KB
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
<?php get_header(); ?>
<div class="container">
<header class="search-header">
<?php if ( have_posts() ) : ?>
<p class="archive-type"><?php nota_e( 'Search' ); ?></p>
<h1 class="archive-title">
<?php echo esc_html( nota_t( 'Results for' ) ) . ' '; ?>
<em><?php echo esc_html( get_search_query() ); ?></em>
</h1>
<?php else : ?>
<p class="archive-type"><?php nota_e( 'Search' ); ?></p>
<h1 class="archive-title"><?php nota_e( 'No results found' ); ?></h1>
<?php endif; ?>
<?php get_search_form(); ?>
</header>
<?php if ( have_posts() ) : ?>
<div class="post-grid">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'card' ); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>" class="post-thumbnail">
<?php the_post_thumbnail( 'large' ); ?>
</a>
<?php endif; ?>
<div class="card-content">
<h2 class="entry-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
<div class="entry-excerpt">
<?php the_excerpt(); ?>
</div>
<a href="<?php the_permalink(); ?>" class="read-more"><?php nota_e( 'Read more' ); ?></a>
</div>
</article>
<?php endwhile; ?>
</div>
<div class="pagination">
<?php the_posts_pagination( array(
'prev_text' => nota_t( 'Previous' ),
'next_text' => nota_t( 'Next' ),
) ); ?>
</div>
<?php else : ?>
<p class="search-no-results"><?php nota_e( 'No articles found' ); ?></p>
<?php endif; ?>
</div>
<?php get_footer(); ?>