-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-member.php
94 lines (75 loc) · 1.9 KB
/
archive-member.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
93
94
<?php
/**
* The archive template file for member post type
*
* @package Wordtrap
* @since wordtrap 1.0.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$categories = get_categories(
array(
'taxonomy' => 'member_category',
'hide_empty' => true,
'orderby' => wordtrap_options( 'members-cat-orderby' ),
'order' => wordtrap_options( 'members-cat-order' ),
)
);
// View mode
$view_mode = wordtrap_get_view_mode();
// Pagination
$pagination = wordtrap_options( 'members-pagination' );
get_header();
?>
<?php
if ( have_posts() ) :
?>
<div class="categories-filter-wrap">
<?php
if ( $pagination ) : ?>
<div class="posts-pagination-container posts-pagination-<?php echo esc_attr( $pagination ) ?>">
<?php
endif;
wordtrap_posts_filter_navigation( 'posts-filter-above', 'member_category', $categories );
if ( $view_mode === 'grid' ) :
?>
<div class="posts-grid categories-filter-items posts-view-masonry <?php echo esc_attr( wordtrap_grid_view_classes() ) ?>">
<?php
else:
?>
<div class="categories-filter-items">
<?php
endif;
// Load posts loop.
while ( have_posts() ) :
the_post();
if ( $view_mode === 'grid' ) :
?>
<div class="post-wrap">
<?php
endif;
get_template_part( 'template-parts/member/content' );
if ( $view_mode === 'grid' ) :
?>
</div><!-- .post-wrap -->
<?php
endif;
endwhile;
?>
</div><!-- .post-wrap -->
<?php
wordtrap_posts_filter_navigation( 'posts-filter-below' );
if ( $pagination ) : ?>
</div><!-- .posts-pagination-container -->
<?php
endif;
?>
</div>
<?php
else :
// If no content, include the "No posts found" template.
get_template_part( 'template-parts/content/content', 'none' );
endif;
?>
<?php
get_footer();