-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-team.php
85 lines (54 loc) · 1.94 KB
/
template-team.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
<?php
/**
* Team template
*
* @package vogue
* @since 1.0.0
*/
/* Template Name: Team */
// File Security Check
if ( ! defined( 'ABSPATH' ) ) { exit; }
$config = Presscore_Config::get_instance();
$config->set( 'template', 'team' );
presscore_config_base_init();
// add content area
add_action( 'presscore_before_main_container', 'presscore_page_content_controller', 15 );
get_header();
if ( presscore_is_content_visible() ): ?>
<!-- Content -->
<div id="content" class="content" role="main">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); // main loop
do_action( 'presscore_before_loop' );
if ( post_password_required() ) {
the_content();
} else {
// fullwidth wrap open
if ( $config->get( 'full_width' ) ) { echo '<div class="full-width-wrap">'; }
// masonry container open
echo '<div ' . presscore_masonry_container_class( array( 'wf-container' ) ) . presscore_masonry_container_data_atts() . '>';
//////////////////////
// Custom loop //
//////////////////////
$page_query = Presscore_Inc_Team_Post_Type::get_template_query();
if ( $page_query->have_posts() ): while( $page_query->have_posts() ): $page_query->the_post();
// populate config
presscore_populate_team_config();
dt_get_template_part( 'team/team-post' );
endwhile; wp_reset_postdata(); endif;
// masonry container close
echo '</div>';
// fullwidth wrap close
if ( $config->get( 'full_width' ) ) { echo '</div>'; }
/////////////////////
// Pagination //
/////////////////////
dt_paginator( $page_query );
}
do_action( 'presscore_after_loop' );
endwhile; endif; // main loop
?>
</div><!-- #content -->
<?php
do_action('presscore_after_content');
endif; // if content visible
get_footer(); ?>