-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patharchive.php
65 lines (45 loc) · 1.77 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
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Kava
*/
get_header();
do_action( 'kava-theme/site/site-content-before', 'archive' ); ?>
<div <?php kava_content_class() ?>>
<?php
$show_archive_title = kava_theme()->customizer->get_value( 'show_archive_title' );
$show_archive_desc = kava_theme()->customizer->get_value( 'show_archive_desc' );
if ( filter_var( $show_archive_title, FILTER_VALIDATE_BOOLEAN ) || filter_var( $show_archive_desc, FILTER_VALIDATE_BOOLEAN ) ) : ?>
<header class="page-header">
<?php
if ( filter_var( $show_archive_title, FILTER_VALIDATE_BOOLEAN ) ) {
the_archive_title( '<h1 class="page-title">', '</h1>' );
}
if ( filter_var( $show_archive_desc, FILTER_VALIDATE_BOOLEAN ) ) {
the_archive_description( '<div class="archive-description">', '</div>' );
}
?>
</header><!-- .page-header -->
<?php endif; ?>
<div class="row">
<?php do_action( 'kava-theme/site/primary-before', 'archive' ); ?>
<div id="primary" <?php kava_primary_content_class(); ?>>
<?php do_action( 'kava-theme/site/main-before', 'archive' ); ?>
<main id="main" class="site-main"><?php
if ( have_posts() ) :
kava_theme()->do_location( 'archive', 'template-parts/posts-loop' );
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?></main><!-- #main -->
<?php do_action( 'kava-theme/site/main-after', 'archive' ); ?>
</div><!-- #primary -->
<?php do_action( 'kava-theme/site/primary-after', 'archive' ); ?>
<?php get_sidebar(); // Loads the sidebar.php template. ?>
</div>
</div>
<?php do_action( 'kava-theme/site/site-content-after', 'archive' );
get_footer();