From: Laury GvR Date: Fri, 9 Sep 2016 21:08:50 +0000 (-0400) Subject: Sidebar styles and markup completed X-Git-Tag: v1.0.0^2~51 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=78435539a9f67c9dc8439a12d041180b35daa636;p=WP-Themes%2Fcapstone.git 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. --- 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 @@ - -