This repository was archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
63 lines (56 loc) · 1.38 KB
/
archive.php
File metadata and controls
63 lines (56 loc) · 1.38 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
<?php
/**
* The template for displaying archive pages
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Positor
*/
?>
<?php get_header(); ?>
<div class="bg-gray-300 py-3">
<header class="container page-header">
<?php
the_archive_title( '<h1 class="page-title display-2">', '</h1>' );
the_archive_description( '<div class="taxonomy-description lead">', '</div>' );
?>
</header>
</div>
<div class="container">
<div class="row">
<!-- Loop -->
<?php
if ( have_posts() ) :
// Check if there should be place for a sidebar.
if ( is_active_sidebar( 'sidebar-frontpage' ) ) {
echo '<div class="col-md-8">';
} else {
echo '<div class="col">';
}
/* Start the Loop */
while ( have_posts() ) :
the_post();
echo '<div class="py-3">';
get_template_part( 'components/card/card-standard', get_post_format() );
echo '</div>';
endwhile;
echo '</div>';
// Show sidebar.
if ( is_active_sidebar( 'sidebar-frontpage' ) ) {
echo '<div class="col-md-4 py-5">';
dynamic_sidebar( 'sidebar-frontpage' );
echo '</div>';
}
// Post navigation for prev/next index page.
echo '<div class="container">';
get_template_part( 'components/common/archive-navigation', get_post_format() );
echo '</div>';
else :
get_template_part( 'components/post/content', 'none' );
endif;
?>
</div>
</div>
<!-- End of Loop -->
<?php
get_footer();