-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory.php
More file actions
36 lines (26 loc) · 991 Bytes
/
category.php
File metadata and controls
36 lines (26 loc) · 991 Bytes
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
<?php
/**
* The template for displaying Category Archive pages.
*
* @package WordPress
* @subpackage Boopress
* @since Boopress 1.0
*/
get_header(); ?>
<?php if ( have_posts() ) : ?>
<h2><?php printf( __( 'Category Archives: %s', 'boopress' ), '' . single_cat_title( '', false ) . '' ); ?></h2>
<?php $category = category_description() ?>
<?php if(strlen($category) > 0): ?>
<div class="alert alert-info"><?php echo $category ?></div>
<?php endif; ?>
<?php
/* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.
*/
get_template_part( 'loop', 'category' );
?>
<?php else: ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
<?php get_footer(); ?>