-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcategory.php
30 lines (26 loc) · 847 Bytes
/
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
<?php
get_header(); ?>
<div class="page">
<main id="main" class="site-main" role="main">
<h2 class="text-center question-topic"><?php $title = single_cat_title( '', false ); echo $title;?></h2>
<?php
if ( have_posts() ) :
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array(
'paged' => $paged,
'posts_per_page' => get_option('posts_per_page'),
'category_name' => $title
);
$the_query = new WP_Query($args); ?>
<?php get_sidebar('widgety-top'); ?>
<?php include('list-of-posts.php'); ?>
<?php endif;wp_reset_postdata();?>
</div>
<div class="col-lg-4 col-md-5">
<?php get_sidebar();?>
<?php get_sidebar('footer');?>
</div>
</div>
</main>
</div>
<?php get_footer();