team members 20240515
public
May 15, 2024
Never
52
1 <?php 2 $title = get_sub_field('title'); 3 $subtitle = get_sub_field('subtitle'); 4 5 $args = array( 6 'post_type' => array( 'team_member' ), 7 'post_status' => array( 'publish' ), 8 'posts_per_page' => 4, 9 'orderby' => 'menu_order', 10 'order' => 'ASC', 11 'facetwp' => true, 12 ); 13 //TODO: Proper background headshots, and full photos to accompany 14 $query = new WP_Query( $args ); 15 ?> 16 17 <div class="content-row team-members"> 18 <?php if($title || $subtitle):?> 19 <div class="titles content-bounds text-center mb-5"> 20 <?php if($title):?><div class="title"> 21 <h3 class="title"><?php echo $title;?></h3> 22 </div><?php endif;?> 23 <?php if($subtitle): ?><p class="copy"><?php echo $subtitle;?></p><?php endif;?> 24 </div> 25 <?php endif;?> 26 27 <div class="filters content-bounds"> 28 <div class="filters-inner"> 29 <div class="filter categories"><?php echo do_shortcode('[facetwp facet="cats"]');?></div> 30 </div> 31 </div> 32 <?php if($query->have_posts()): 33 $count = $query->found_posts;?> 34 <div class="team-members-container content-bounds"> 35 <div class="results-container" data-n="<?php echo $count;?>"> 36 <?php while ( $query->have_posts() ) : 37 $query->the_post(); 38 get_template_part('components/content-rows/team_member'); 39 endwhile;?> 40 </div> 41 </div> 42 <?php else :?> 43 <p class="text-center p-2">Sorry, no post matched your criteria</p> 44 <?php 45 endif; 46 wp_reset_postdata(); 47 ?> 48 <div class="pagination content-bounds"> 49 <?php echo do_shortcode('[facetwp facet="pagination"]');?> 50 </div> 51 52 </div>