/
category.php
executable file
·66 lines (63 loc) · 1.55 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
<?php
/**
* category archives template part
*
* @link http://codex.wordpress.org/Template_Hierarchy
* @package multiloquent\template_parts
*/
/**
* category archives template part
*/
get_header();
if ( have_posts() ) {
?>
<div class="jumbotron category-banner">
<div class="container-fluid clearfix">
<header>
<h1 class="article_title">
<?php printf( '%s', single_cat_title( '', false ) ); ?>
</h1>
<p>
<?php
printf(
esc_html__('There are %1$s posts in the %2$s category', 'multiloquent'),
$wp_query->found_posts,
single_cat_title('', false)
);
?>
</p>
<div><?php echo category_description(); ?></div>
</header>
</div>
</div>
<section class="container-fluid post clearfix">
<?php
$colour = $multiloquent->multiloquent_get_random_blue_class();
while ( have_posts() ) {
the_post();
$multiloquent->multiloquent_render_the_archive( $colour );
}
?>
</section>
<section class="container-fluid post clearfix">
<?php
get_template_part( 'advert' );
?>
</section>
<div class="container-fluid post clearfix">
<nav class="navitems text-center">
<ul class="pagination">
<li><?php previous_posts_link( esc_html__( 'Previous Entries', 'multiloquent' ) ); ?></li>
<li><?php next_posts_link( esc_html__( 'Next Entries', 'multiloquent' ) ); ?></li>
</ul>
</nav>
</div>
<?php } else { ?>
<div class="container-fluid post clearfix">
<?php
get_template_part( 'error-snippet' );
?>
</div>
<?php
}
get_footer();