From 78435539a9f67c9dc8439a12d041180b35daa636 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Fri, 9 Sep 2016 17:08:50 -0400 Subject: [PATCH] Sidebar styles and markup completed Shop was using shop-sidebar partial, now uses sidebar.php. Can no longer use the same markup as frontpage since that's significantly changed now. --- parts/cats-and-products.php | 57 ++++++++++++++++++ parts/shop-sidebar.php | 106 +++++++++++++++++---------------- scss/_sidebar.scss | 3 + scss/plugins/_woocommerce.scss | 16 +++++ sidebar.php | 7 ++- woocommerce.php | 6 +- 6 files changed, 139 insertions(+), 56 deletions(-) create mode 100644 parts/cats-and-products.php diff --git a/parts/cats-and-products.php b/parts/cats-and-products.php new file mode 100644 index 0000000..eb7bebe --- /dev/null +++ b/parts/cats-and-products.php @@ -0,0 +1,57 @@ +

Event Dates:

+ + $number, + 'orderby' => 'title', + 'order' => 'ASC', + 'hide_empty' => $hide_empty, + 'include' => $ids + ); + $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' => 'white-wines' + 'terms' => $product_category->slug + ) + ), + 'post_type' => 'product', + 'orderby' => 'title,' + ); + $products = new WP_Query( $args ); + if ($products->have_posts()) { ?> +
+
+
+ ' . $product_category->name . ''; + echo "
    "; + + while ( $products->have_posts() ) { + + $products->the_post(); + ?> +
  • + + + +
  • + ";?> +
+
+
+ + + \ No newline at end of file diff --git a/parts/shop-sidebar.php b/parts/shop-sidebar.php index e2922ea..ae24747 100644 --- a/parts/shop-sidebar.php +++ b/parts/shop-sidebar.php @@ -1,58 +1,64 @@ - -