Skip to content

Instantly share code, notes, and snippets.

@deckchairuk
Last active October 18, 2016 18:45
Show Gist options
  • Save deckchairuk/7d9d0783db7fa2047297772664d857ab to your computer and use it in GitHub Desktop.
Save deckchairuk/7d9d0783db7fa2047297772664d857ab to your computer and use it in GitHub Desktop.
<?php if (facetwp_display( 'facet', 'adaptation_levels' ) || facetwp_display( 'facet', 'search' )): ?>
<div class="category-navigation">
<div class="container vpadding--top vpadding--xs">
<div class="row">
<div class="col-xs-12">
<?php echo facetwp_display( 'facet', 'adaptation_levels' ); ?>
<?php echo facetwp_display( 'facet', 'search' ); ?>
</div>
</div>
</div>
</div> <!-- .category-navigation -->
<?php endif ?>
<div class="product-listing">
<div class="container vpadding--lg">
<div class="row">
<?php $args = array(
'post_type'=> 'adaptations',
'facetwp' => true
);
query_posts( $args ); ?>
<div class="facetwp-template">
<?php if (have_posts()): ?>
<?php while(have_posts()) : the_post(); ?>
<div class="col-xs-12 col-sm-6 col-md-4">
<?php get_template_part('modules/product', 'listing-item'); ?>
</div>
<?php endwhile ?>
<?php wp_reset_query(); ?>
<?php else: ?>
<div class="col-xs-12">
<div class="no-results">
<h2>Sorry, we couldn't find any adaptations based on your search</h2>
</div>
</div>
<?php endif ?>
</div>
</div>
</div>
</div> <!-- .product-listing -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment