-
Notifications
You must be signed in to change notification settings - Fork 5
/
archive.php
97 lines (77 loc) · 2.21 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
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
<?php
/**
* The template for displaying Archive pages.
*
* @package StormBringer
* @since StormBringer 0.0.1
*/
?>
<?php get_header(); ?>
<div id="content" role="main">
<?php
/**
* stormbringer_content_after hook.
*/
do_action( 'stormbringer_content_after' );
?>
<header class="page-header archive-header">
<?php
the_archive_title( '<h1 class="page-title archive-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php
// Author vcard
if ( is_author() ) {
$queried_object = get_queried_object();
?>
<?php _e( 'Posts by:', 'stormbringer' ); ?>
<span class="vcard"><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ); ?>" title="<?php echo esc_attr( get_the_author() ); ?>" rel="me"><?php echo get_the_author(); ?></a></span>
<?php } ?>
</header>
<?php if ( have_posts() ) : ?>
<div class="row">
<?php
while ( have_posts() ) : the_post(); ?>
<?php echo stormbringer_bootstrap_grid( $counter_posts, [
'xs' => 12,
'sm' => 6,
'md' => 4,
'lg' => 4
] ) ?>
<div class="col-sm-6 col-md-4">
<?php
$type = get_post_type();
get_template_part( 'content', $type );
?>
</div>
<?php endwhile; ?>
</div>
<?php the_posts_pagination(); ?>
<?php else : ?>
<?php
// No results
get_template_part( 'content', 'none' );
?>
<?php endif; ?>
<footer class="archive-footer">
<?php
$cuztom = get_theme_mod('cuztom');
if($cuztom){
$term = get_queried_object();
$cuztom_term_meta = get_cuztom_term_meta($term->term_id, $term->taxonomy);
if(!empty($cuztom_term_meta['_bottom_description'])){
echo $cuztom_term_meta['_bottom_description'];
}
}
?>
</footer>
<?php
/**
* stormbringer_content_after hook.
*/
do_action( 'stormbringer_content_after' );
?>
</div>
<!-- /#content -->
<?php //get_sidebar( 'blog' ); ?>
<?php get_footer(); ?>