From: Laury GvR Date: Wed, 22 Feb 2017 20:27:44 +0000 (-0500) Subject: Added woocommerce template partials X-Git-Tag: v1.0.0^2~43 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=68b9238f8349610dff91c7aea55fa1533bdeedb5;p=WP-Themes%2Fturkeyville.git Added woocommerce template partials --- diff --git a/parts/shop-cats-and-products.php b/parts/shop-cats-and-products.php new file mode 100644 index 0000000..3c8e0d8 --- /dev/null +++ b/parts/shop-cats-and-products.php @@ -0,0 +1,63 @@ + + + 'title', + 'order' => 'ASC', + 'hide_empty' => false, + 'exclude' => '18' + + ); + $product_categories = get_terms( 'product_cat', $args ); + $count = count($product_categories); + if ( $count > 0 ){ + foreach ( $product_categories as $product_category ) { + $args = array( + 'posts_per_page' => -1, + 'tax_query' => array( + 'relation' => 'AND', + array( + 'taxonomy' => 'product_cat', + 'field' => 'slug', + 'terms' => $product_category->slug + ) + ), + 'post_type' => 'product', + 'post_status' => 'publish', + 'orderby' => 'menu_order', + 'order' => 'ASC', + 'meta_query' => array( + array( + 'key' => '_visibility', + 'value' => 'hidden', + 'compare' => '!=', + ) + ) + ); + $products = new WP_Query( $args ); + if ($products->have_posts()) { ?> +
+ '; + echo '' . $product_category->name . ''; + echo '
'; + echo "";?> + + + + \ No newline at end of file diff --git a/parts/shop-sidebar.php b/parts/shop-sidebar.php new file mode 100644 index 0000000..099429f --- /dev/null +++ b/parts/shop-sidebar.php @@ -0,0 +1,49 @@ + +
+ +
+ +
+ + + + + +
+ + \ No newline at end of file