-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
57 lines (34 loc) · 1.36 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
<?php
/**
* The main template file.
*/
get_header();
$archives_page_layout = get_theme_mod( 'archives-layout', 'full-width' );
$content_classes = "content-area";
$content_classes .= 'full-width' === $archives_page_layout ? " full-layout" : '';
?>
<main id="main" class="site-main" role="main">
<?php if ( 'left-sidebar' === $archives_page_layout ): ?>
<?php get_sidebar(); ?>
<?php endif ?>
<section class="<?php echo esc_attr( $content_classes ); ?>">
<?php the_archive_title( '<h2 class="section-title">', '</h2>' ); ?>
<?php if (is_category() ) { ?><div class="category_description"><?php echo category_description(); ?></div><?php } ?>
<?php if ( have_posts() ) : ?>
<section id="recent-posts" class="recent-posts">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
</section>
<?php get_template_part( 'pagination' ); ?>
<?php else: ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
<div class="clear"></div>
</section><!-- .content-area -->
<?php if ( 'right-sidebar' === $archives_page_layout ): ?>
<?php get_sidebar(); ?>
<?php endif ?>
</main><!-- .site-main -->
<?php
get_footer();