-
Notifications
You must be signed in to change notification settings - Fork 1
/
category.php
101 lines (59 loc) · 2.11 KB
/
category.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
100
101
<?php
$au_boolean = get_theme_mod('au_boolean');
if(!$au_boolean) {
get_header();
}
else {
get_header('au');
}
$category = get_queried_object()->slug;
$category_id = get_queried_object()->term_id;
$post_type = get_post_type();
remove_filter('term_description','wpautop');
?>
<div id="main-content" class="band">
<main id="main" class="container-fluid aria-target" tabindex="-1">
<div class="row">
<?php get_sidebar('top'); ?>
<article id="main-article" class="primary">
<?php
if (function_exists('cwd_base_breadcrumbs')) cwd_base_breadcrumbs();
get_template_part('templates/page/content', 'title');
if( is_active_sidebar('sidebar-101') ) {
dynamic_sidebar('sidebar-101');
}
?>
<!-- Category description, if it exists -->
<?php if(category_description($category_id)) { ?>
<p><span class="intro"><?php echo category_description($category_id); ?></span></p>
<?php } ?>
<section>
<?php $archive_options = get_field('archive_options', 'options'); ?>
<div class="cwd-component cwd-basic no-overlay<?php if( $archive_options[$post_type]['appearance_' . $post_type] == 'grid' ) { echo ' tiles'; } ?>">
<div class="cards<?php if( $archive_options[$post_type]['appearance_' . $post_type] == 'grid' ) { echo ' flex-grid'; } ?>">
<?php
if (have_posts()): while (have_posts()) : the_post(); // The loop
// Generic category template. To customize by post type, create /templates/post/content-category-$category.php
get_template_part('templates/post/content-category', $category);
endwhile;
else:
get_template_part('templates/page/content', 'none');
endif;
?>
</div>
</div>
</section>
<?php
if( is_active_sidebar('sidebar-102') ) {
dynamic_sidebar('sidebar-102');
}
?>
<?php if( function_exists('cwd_pagination') ) cwd_pagination(); ?>
</article>
<?php get_sidebar('bottom'); ?>
</div>
</main>
</div>
<?php get_template_part('templates/page/color', 'bands'); ?>
<?php
get_footer();