forked from bootscore/bootscore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
151 lines (112 loc) · 7.54 KB
/
index.php
File metadata and controls
151 lines (112 loc) · 7.54 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
/**
* The main template file
* Template Version: 6.4.0
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Bootscore
*/
// Exit if accessed directly
defined('ABSPATH') || exit;
get_header();
?>
<div id="content" class="site-content <?= esc_attr(apply_filters('bootscore/class/container', 'container', 'index')); ?> <?= esc_attr(apply_filters('bootscore/class/content/spacer', 'pt-4 pb-5', 'index')); ?>">
<div id="primary" class="content-area">
<?php do_action('bootscore_after_primary_open', 'index'); ?>
<main id="main" class="site-main">
<!-- Header -->
<div class="p-5 text-center bg-body-tertiary rounded mb-4">
<?php do_action( 'bootscore_before_title', 'index' ); ?>
<h1 class="entry-title <?= esc_attr(apply_filters('bootscore/class/entry/title', '', 'index')); ?>"><?= esc_html(get_bloginfo('name')); ?></h1>
<?php do_action( 'bootscore_after_title', 'index' ); ?>
<p class="lead mb-0"><?= esc_html(get_bloginfo('description')); ?></p>
</div>
<!-- Post List -->
<div class="row">
<div class="<?= esc_attr(apply_filters('bootscore/class/main/col', 'col')); ?>">
<?php do_action( 'bootscore_before_loop', 'index' ); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php do_action( 'bootscore_before_loop_item', 'index' ); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( esc_attr(apply_filters('bootscore/class/loop/card', 'card horizontal mb-4', 'index')) ); ?>>
<div class="<?= esc_attr(apply_filters('bootscore/class/loop/card/row', 'row g-0', 'index')); ?>">
<?php do_action('bootscore_before_loop_thumbnail', 'index'); ?>
<?php if (has_post_thumbnail()) : ?>
<div class="<?= esc_attr(apply_filters('bootscore/class/loop/card/image/col', 'col-lg-6 col-xl-5 col-xxl-4', 'index')); ?>">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('medium', array('class' => esc_attr(apply_filters('bootscore/class/loop/card/image', 'card-img-lg-start', 'index')))); ?>
</a>
</div>
<?php endif; ?>
<?php do_action('bootscore_after_loop_thumbnail', 'index'); ?>
<div class="<?= esc_attr(apply_filters('bootscore/class/loop/card/content/col', 'col', 'index')); ?>">
<div class="<?= esc_attr(apply_filters('bootscore/class/loop/card/body', 'card-body', 'index')); ?>">
<div class="<?= esc_attr(apply_filters('bootscore/class/loop/card/content/meta-wrapper', 'd-flex justify-content-between gap-3')); ?>">
<?php if (apply_filters('bootscore/loop/category', true, 'index')) : ?>
<?php bootscore_category_badge(); ?>
<?php endif; ?>
<?php if (is_sticky() ) { ?>
<p class="sticky-badge"><span class="<?= esc_attr(apply_filters('bootscore/class/loop/card/content/sticky-post-badge', 'badge text-bg-danger')); ?>"><?= wp_kses_post(apply_filters('bootscore/icon/star', '<i class="fa-solid fa-star"></i>')); ?></span></p>
<?php } ?>
</div>
<?php do_action('bootscore_before_loop_title', 'index'); ?>
<a class="<?= esc_attr(apply_filters('bootscore/class/loop/card/title/link', 'text-body text-decoration-none', 'index')); ?>" href="<?php the_permalink(); ?>">
<?php the_title('<h2 class="' . esc_attr(apply_filters('bootscore/class/loop/card/title', 'blog-post-title h5', 'index')) . '">', '</h2>'); ?>
</a>
<?php do_action('bootscore_after_loop_title', 'index'); ?>
<?php if (apply_filters('bootscore/loop/meta', true, 'index')) : ?>
<?php if ('post' === get_post_type()) : ?>
<p class="meta small mb-2 text-body-secondary">
<?php
bootscore_date();
bootscore_author();
bootscore_comments();
bootscore_edit();
?>
</p>
<?php endif; ?>
<?php endif; ?>
<?php if (apply_filters('bootscore/loop/excerpt', true, 'index')) : ?>
<p class="<?= esc_attr(apply_filters('bootscore/class/loop/card-text/excerpt', 'card-text', 'index')); ?>">
<a class="<?= esc_attr(apply_filters('bootscore/class/loop/card-text/excerpt/link', 'text-body text-decoration-none', 'index')); ?>" href="<?php the_permalink(); ?>">
<?= esc_html(wp_strip_all_tags(get_the_excerpt())); ?>
</a>
</p>
<?php endif; ?>
<?php if (apply_filters('bootscore/loop/read-more', true, 'index')) : ?>
<p class="<?= esc_attr(apply_filters('bootscore/class/loop/card-text/read-more', 'card-text', 'index')); ?>">
<a class="<?= esc_attr(apply_filters('bootscore/class/loop/read-more', 'read-more', 'index')); ?>" href="<?php the_permalink(); ?>">
<?= wp_kses_post(apply_filters('bootscore/loop/read-more/text', __('Read more »', 'bootscore', 'index'))); ?>
</a>
</p>
<?php endif; ?>
<?php if (apply_filters('bootscore/loop/tags', true, 'index')) : ?>
<?php bootscore_tags(); ?>
<?php endif; ?>
<?php do_action('bootscore_after_loop_tags', 'index'); ?>
</div>
<?php do_action('bootscore_loop_item_after_card_body', 'index'); ?>
</div><!-- col -->
</div><!-- row -->
</article><!-- article -->
<?php do_action('bootscore_after_loop_item', 'index'); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php do_action('bootscore_after_loop', 'index'); ?>
<div class="entry-footer">
<?php do_action( 'bootscore_before_pagination', 'index' ); ?>
<?php bootscore_pagination(); ?>
</div>
</div><!-- col -->
<?php get_sidebar(); ?>
</div><!-- row -->
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- #content -->
<?php
get_footer();