Created
July 13, 2017 11:52
-
-
Save stompweb/f162e829aea37dabbc87d20ef72cd304 to your computer and use it in GitHub Desktop.
Facet WP Category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="sort-by"> | |
<div class="col-xs-7"> | |
<div class="parent-link"> | |
<?php | |
$current = get_queried_object(); | |
$parent = get_term( $current->parent, $current->taxonomy ); ?> | |
<a href="<?php echo get_term_link( $parent ); ?>"> | |
← Back to all <?php echo esc_html( $parent->name ); ?> | |
</a> | |
</div> | |
</div> | |
<div class="col-xs-5"> | |
<?php echo facetwp_display( 'sort' ); ?> | |
</div> | |
</div> | |
<div class="col-md-3 col-sm-4"> | |
<div class="filters"> | |
<span class="count">Currently showing <strong><?php echo facetwp_display( 'counts' ); ?></strong> upgrade parts.</span> | |
<a href="#" class="visible-xs filter-toggle"> | |
<i class="fa fa-filter" aria-hidden="true"></i> | |
<span>Show</span> Filters | |
</a> | |
<div class="facets"> | |
<br class="visible-xs"> | |
<h3 class="widget-title">Colour</h3> | |
<?php echo facetwp_display( 'facet', 'colour' ); ?> | |
</div> | |
</div> | |
</div> | |
<div class="col-md-9 col-sm-8"> | |
<div class="facetwp-template"> | |
<?php woocommerce_product_loop_start(); ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php | |
/** | |
* woocommerce_shop_loop hook. | |
* | |
* @hooked WC_Structured_Data::generate_product_data() - 10 | |
*/ | |
do_action( 'woocommerce_shop_loop' ); | |
?> | |
<?php wc_get_template_part( 'content', 'product' ); ?> | |
<?php endwhile; // end of the loop. ?> | |
<?php woocommerce_product_loop_end(); ?> | |
</div> | |
<?php echo facetwp_display( 'pager' ); ?> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Filter by category??