-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
58 lines (36 loc) · 1.6 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
<?php get_header(); ?>
<main class="main">
<article class="container">
<?php if (have_posts()) : ?>
<h1 class="text-center">
<?php printf(__('Search Results for: %s', 'joompress'), '<span>' . get_search_query() . '</span>'); ?>
</h1>
<div class="row">
<?php while (have_posts()) : the_post(); ?>
<section id="post-<?php the_ID(); ?>" <?php post_class('col-sm-6 col-md-4'); ?>>
<h2>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h2>
<?php if (has_post_thumbnail()) { ?>
<figure><?php the_post_thumbnail('medium'); ?></figure>
<?php } ?>
<?php the_excerpt(); ?>
<p>
<a class="btn btn-primary btn-sm" href="<?php the_permalink(); ?>"><?php _e('Read more', 'joompress'); ?></a>
</p>
</section>
<?php endwhile; ?>
</div>
<?php jp_pagination(); ?>
<?php else : ?>
<h1><?php _e('Nothing Found', 'joompress'); ?></h1>
<p><?php _e('Sorry, but nothing matched your search terms. Please try again with some different keywords.',
'joompress'); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</article>
</main>
<?php get_sidebar(); ?>
<?php get_footer(); ?>