forked from bootscore/bootscore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
99 lines (75 loc) · 3.02 KB
/
archive.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Bootscore
*/
get_header();
?>
<div id="content" class="site-content <?= bootscore_container_class(); ?> py-5 mt-5">
<div id="primary" class="content-area">
<?php bs_after_primary(); ?>
<div class="row">
<div class="<?= bootscore_main_col_class(); ?>">
<main id="main" class="site-main">
<header class="page-header mb-4">
<?php the_archive_title('<h1>', '</h1>'); ?>
<?php the_archive_description('<div class="archive-description">', '</div>'); ?>
</header>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="card horizontal mb-4">
<div class="row g-0">
<?php if (has_post_thumbnail()) : ?>
<div class="col-lg-6 col-xl-5 col-xxl-4">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('medium', array('class' => 'card-img-lg-start')); ?>
</a>
</div>
<?php endif; ?>
<div class="col">
<div class="card-body">
<?php bootscore_category_badge(); ?>
<a class="text-body text-decoration-none" href="<?php the_permalink(); ?>">
<?php the_title('<h2 class="blog-post-title h5">', '</h2>'); ?>
</a>
<?php if ('post' === get_post_type()) : ?>
<p class="meta small mb-2 text-body-tertiary">
<?php
bootscore_date();
bootscore_author();
bootscore_comments();
bootscore_edit();
?>
</p>
<?php endif; ?>
<p class="card-text">
<a class="text-body text-decoration-none" href="<?php the_permalink(); ?>">
<?= strip_tags(get_the_excerpt()); ?>
</a>
</p>
<p class="card-text">
<a class="read-more" href="<?php the_permalink(); ?>">
<?php _e('Read more »', 'bootscore'); ?>
</a>
</p>
<?php bootscore_tags(); ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<footer class="entry-footer">
<?php bootscore_pagination(); ?>
</footer>
</main>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</div>
<?php
get_footer();