Skip to content

Instantly share code, notes, and snippets.

@tinhochu
Created July 18, 2017 13:27
Show Gist options
  • Save tinhochu/fe0ac1d1a76080f86d72b6586ba0f9bc to your computer and use it in GitHub Desktop.
Save tinhochu/fe0ac1d1a76080f86d72b6586ba0f9bc to your computer and use it in GitHub Desktop.
Children Site: Our Team
<div class="location-wrapper">
<div class="facets-wrapper">
<?php dynamic_sidebar('location-facet-widget'); ?>
<?php echo facetwp_display( 'facet', 'my_search' ); ?>
</div>
<div class="main-content-wrapper">
<div class="facetwp-template">
<?php
switch_to_blog(1);
$args = array(
"post_type" => "cpt_teammember",
"post_status" => "publish",
"orderby" => "date",
"order" => "DESC",
"posts_per_page" => -1,
'facetwp' => true,
"meta_query" => array(
array(
"key" => "franchise_website",
"value" => "austin",
'compare' => 'LIKE'
)
)
);
$member_query = new WP_Query($args);
?>
<?php if ( $member_query->have_posts() ) : while ( $member_query->have_posts() ) : $member_query->the_post(); ?>
<?php get_template_part('inc/loop','locations'); ?>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; restore_current_blog();?>
<?php wp_reset_postdata();?>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment