-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory.php
More file actions
71 lines (54 loc) · 2.13 KB
/
Copy pathcategory.php
File metadata and controls
71 lines (54 loc) · 2.13 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
71
<?php
/**
* The template for displaying Category pages
*
* @link http://codex.wordpress.org/Template_Hierarchy
*/
get_header(); ?>
<div id="left-content">
<?php //GET THEME HEADER CONTENT
$title = sprintf( __( '<span>%s</span>', 'woffice' ), single_cat_title( '', false ));
woffice_title($title); ?>
<!-- START THE CONTENT CONTAINER -->
<div id="content-container">
<!-- START CONTENT -->
<div id="content">
<?php Woffice_Frontend::frontend_render('post',$hasError); ?>
<?php
$blog_layout = 'classic';
$content_type = 'content';
if(get_post_type() == 'post'){
$blog_layout = woffice_get_settings_option('blog_layout');
$blog_layout = (isset($_GET['blog_masonry'])) ? 'masonry' : $blog_layout;
$masonry_columns = woffice_get_settings_option('masonry_columns');
$masonry_columns_class = 'masonry-layout--'.$masonry_columns.'-columns';
echo ('masonry' === $blog_layout) ? '<div id="directory" class="masonry-layout '. $masonry_columns_class .'">' : '';
$content_type = ('masonry' === $blog_layout) ? 'content-masonry' : 'content';
}
?>
<?php
/**
* Reset the query before displaying the post
* A loop must be unclosed before this call
* See: WOF-161
*/
wp_reset_query(); ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php // We check for the role :
if (woffice_is_user_allowed()) { ?>
<?php get_template_part( $content_type ); ?>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
<?php echo ('masonry' === $blog_layout) ? '</div>' : ''; ?>
<!-- THE NAVIGATION -->
<?php woffice_paging_nav(); ?>
</div>
</div><!-- END #content-container -->
<?php woffice_scroll_top(); ?>
</div><!-- END #left-content -->
<?php
get_footer();