-
Notifications
You must be signed in to change notification settings - Fork 4
/
category.php
92 lines (89 loc) · 3.37 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
<?php
/**
* @Theme Name : Wallstreet-Pro
* @file : category.php
* @package : wallstreet-Pro
@author : webriti
* @filesource : wp-content/themes/wallstreet/category.php
*/
get_header();
$wallstreet_pro_options=theme_data_setup();
$current_options = wp_parse_args( get_option( 'wallstreet_pro_options', array() ), $wallstreet_pro_options );
?>
<!-- Page Title Section -->
<div class="page-mycarousel" style='background: url("<?php echo( get_header_image() ); ?>") repeat scroll center 0 #143745;'>
<div class="page-title-col">
<div class="container">
<div class="row">
<div class="page-header-title">
<h1><?php echo single_cat_title("", false); ?></h1>
</div>
</div>
</div>
<?php get_template_part('index', 'banner'); ?>
</div>
</div>
<!-- /Page Title Section -->
<!-- Blog & Sidebar Section -->
<div class="container">
<div class="row">
<div class="col-md-<?php echo (is_active_sidebar( 'sidebar_primary' )?'8':'12'); ?>">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$category_id=get_query_var('cat');
$args = array( 'post_type' => 'post','paged'=>$paged,'cat' => $category_id);
$post_type_data = new WP_Query( $args );
while($post_type_data->have_posts()){
$post_type_data->the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class('blog-section-right'); ?>>
<?php if(has_post_thumbnail()){ ?>
<?php $defalt_arg =array('class' => "img-responsive"); ?>
<div class="blog-post-img">
<?php the_post_thumbnail('', $defalt_arg); ?>
</div>
<?php } ?>
<div class="clear"></div>
<div class="blog-post-title">
<?php if($current_options['archive_page_meta_section_settings'] == false) { ?>
<div class="blog-post-date"><span class="date"><?php echo get_the_date('j'); ?> <small><?php echo get_the_date('M'); ?></small></span>
<span class="comment"><i class="fa fa-comment"></i><?php comments_number('0', '1','%'); ?></span>
</div>
<div class="blog-post-title-wrapper">
<?php } else { ?>
<div class="blog-post-title-wrapper" style="width:100%;">
<?php } ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content( __( 'Read More' , 'wallstreet' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Page', 'wallstreet' ), 'after' => '</div>' ) ); ?>
<?php if($current_options['archive_page_meta_section_settings'] == false) { ?>
<div class="blog-post-meta">
<a id="blog-author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><i class="fa fa-user"></i> <?php the_author(); ?></a>
<?php $tag_list = get_the_tag_list();
if(!empty($tag_list)) { ?>
<div class="blog-tags">
<i class="fa fa-tags"></i><?php the_tags('', ', ', ''); ?>
</div>
<?php } ?>
<?php $cat_list = get_the_category_list();
if(!empty($cat_list)) { ?>
<div class="blog-tags">
<i class="fa fa-star"></i><?php the_category(', '); ?>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
<?php
$Webriti_pagination = new Webriti_pagination();
$Webriti_pagination->Webriti_page($paged, $post_type_data)
?>
</div><!--/Blog Area-->
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>
<!-- /Blog & Sidebar Section -->