-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
48 lines (31 loc) · 949 Bytes
/
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
<?php get_header(); ?>
<main>
<article>
<h2>Search Results | <?php echo get_search_query(); ?></h2>
<?php
while (have_posts()) : the_post();
?>
<article>
<h2><a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h2>
<div class="date"><?php the_time("j. F Y"); ?> | <a href="#"><?php echo get_the_tag_list() ?></a></div>
<?php if(has_post_thumbnail()) { ?>
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID()); ?>" />
<?php } ?>
<?php the_excerpt(); ?>
<div class="link-with-arrow"><a href="<?php the_permalink(); ?>" class="read-more">Read more</a></div>
</article>
<?php endwhile; ?>
</article>
</main>
<section class="more-articles">
<?php echo paginate_links(
array(
'prev_text' => '<span class="prev-articles">Previous articles</span>',
'next_text' => '<span class="next-articles">Next articles</span>'
)
); ?>
</section>
<?php get_footer(); ?>