-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
64 lines (53 loc) · 1.76 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
63
64
<?php
/**
* Main template file.
*
* @package SimpleWise
*/
get_header();
?>
<!-- Articles List Section -->
<section class="articles-list-section">
<div class="articles-list__header container">
<h2>Search Results For: <?php the_search_query(); ?></h2>
<p>Here the list of all the results</p>
</div>
<div class="articles-list-container container">
<?php
if (have_posts()) : while (have_posts()) : the_post();
$archive_year = get_the_time('Y');
$archive_month = get_the_time('m');
$archive_day = get_the_time('d');
?>
<div class="listed-article " data-aos="fade-up">
<div class="listed-article__img" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<a href="<?php the_permalink(); ?>"><i class="fas fa-ellipsis-h"></i></a>
</div>
<div class="listed-article__info">
<div class="entry__header">
<a class="entry__date" href="<?php echo get_day_link($archive_year, $archive_month, $archive_day); ?>"><?php the_date(); ?></a>
<h3 class="entry__title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</div>
<div class="entry__text">
<p class="entry__paragraph">
<?php the_excerpt(); ?>
</p>
</div>
<div class="entry__category">
<?php the_category(', '); ?>
</div>
</div>
</div>
<?php endwhile;
else : ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div>
</section>
<!-- End Articles List Section -->
<?php
$extra_section = locate_template('extra-section.php');
load_template($extra_section);
?>
<?php
get_footer();