-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaxonomy-blog_category.php
More file actions
70 lines (69 loc) · 5.04 KB
/
taxonomy-blog_category.php
File metadata and controls
70 lines (69 loc) · 5.04 KB
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
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<?php get_header(); ?>
<!-- CONTENT -->
<div class="rh-container">
<div class="rh-content-wrap clearfix">
<!-- Main Side -->
<div class="main-side clearfix<?php if (rehub_option('blog_archive_layout') == 'gridfull_blog' || rehub_option('blog_archive_layout') == 'cardblogfull') : ?> full_width<?php endif ;?>">
<?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;?>
<?php /* If this is a category archive */ if (is_tax('blog_category')) { ?>
<div class="wpsm-title middle-size-title wpsm-cat-title"><h5><span><?php esc_html_e('Category:', 'rehub-theme'); ?></span> <?php single_cat_title(); ?></h5></div>
<?php if( !is_paged()) : ?><article class='top_rating_text post'><?php echo category_description(); ?></article><?php endif ;?>
<?php /* If this is a tag archive */ } elseif( is_tax('blog_tag') ) { ?>
<div class="wpsm-title middle-size-title wpsm-cat-title"><h5><span><?php esc_html_e('Tag:', 'rehub-theme'); ?></span> <?php single_tag_title(); ?></h5></div>
<article class='top_rating_text'><?php echo tag_description(); ?></article>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<div class="wpsm-title middle-size-title wpsm-cat-title"><h5><span><?php esc_html_e('Archive:', 'rehub-theme'); ?></span> <?php the_time('F jS, Y'); ?></h5></div>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<div class="wpsm-title middle-size-title wpsm-cat-title"><h5><span><?php esc_html_e('Browsing Archive', 'rehub-theme'); ?></span> <?php the_time('F, Y'); ?></h5></div>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<div class="wpsm-title middle-size-title wpsm-cat-title"><h5><span><?php esc_html_e('Browsing Archive', 'rehub-theme'); ?></span> <?php the_time('Y'); ?></h5></div>
<?php } ?>
<?php if (rehub_option('blog_archive_layout') == 'grid_blog') : ?>
<?php wp_enqueue_script('masonry'); wp_enqueue_script('imagesloaded'); wp_enqueue_script('masonry_init'); ?>
<div class="masonry_grid_fullwidth col_wrap_two">
<?php elseif (rehub_option('blog_archive_layout') == 'gridfull_blog') : ?>
<?php wp_enqueue_script('masonry'); wp_enqueue_script('imagesloaded'); wp_enqueue_script('masonry_init'); ?>
<div class="masonry_grid_fullwidth col_wrap_three">
<?php elseif (rehub_option('blog_archive_layout') == 'cardblog') : ?>
<div class="coloredgrid rh-flex-eq-height col_wrap_three">
<?php elseif (rehub_option('blog_archive_layout') == 'cardblogfull') : ?>
<div class="coloredgrid rh-flex-eq-height col_wrap_fourth">
<?php endif ;?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if (rehub_option('blog_archive_layout') == 'big_blog') : ?>
<?php include(rh_locate_template('inc/parts/query_type2.php')); ?>
<?php elseif (rehub_option('blog_archive_layout') == 'list_blog') : ?>
<?php include(rh_locate_template('inc/parts/query_type1.php')); ?>
<?php elseif (rehub_option('blog_archive_layout') == 'grid_blog' || rehub_option('blog_archive_layout') == 'gridfull_blog') : ?>
<?php include(rh_locate_template('inc/parts/query_type3.php')); ?>
<?php elseif (rehub_option('blog_archive_layout') == 'cardblog' || rehub_option('blog_archive_layout') == 'cardblogfull') : ?>
<?php include(rh_locate_template('inc/parts/color_grid.php')); ?>
<?php else : ?>
<?php include(rh_locate_template('inc/parts/query_type1.php')); ?>
<?php endif ;?>
<?php endwhile; ?>
<?php else : ?>
<h5><?php esc_html_e('Sorry. No posts in this category yet', 'rehub-theme'); ?></h5>
<?php endif; ?>
<?php if (rehub_option('blog_archive_layout') == 'grid_blog' || rehub_option('blog_archive_layout') == 'gridfull_blog' || rehub_option('blog_archive_layout') == 'cardblog' || rehub_option('blog_archive_layout') == 'cardblogfull') : ?></div><?php endif ;?>
<div class="clearfix"></div>
<?php rehub_pagination(); ?>
</div>
<!-- /Main Side -->
<?php if (rehub_option('blog_archive_layout') != 'gridfull_blog' && rehub_option('blog_archive_layout') != 'cardblogfull') : ?>
<!-- Sidebar -->
<?php get_sidebar(); ?>
<!-- /Sidebar -->
<?php endif ;?>
</div>
</div>
<!-- /CONTENT -->
<!-- FOOTER -->
<?php get_footer(); ?>