From ebdc415c5c9382adc9d9a6b783d8d738275e0662 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 15 Feb 2017 16:49:36 -0500 Subject: [PATCH] Show category names above products on the shop page. --- parts/shop-cats-and-products.php | 6 +-- woocommerce/content-product.php | 71 ++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 woocommerce/content-product.php diff --git a/parts/shop-cats-and-products.php b/parts/shop-cats-and-products.php index 0cd06a9..d226ae9 100644 --- a/parts/shop-cats-and-products.php +++ b/parts/shop-cats-and-products.php @@ -1,11 +1,9 @@ $number, 'orderby' => 'title', 'order' => 'ASC', - 'hide_empty' => $hide_empty, - 'include' => $ids, + 'hide_empty' => false, 'exclude' => '18' ); @@ -47,7 +45,7 @@ have_posts()) { echo "TBD"; } echo "";?> diff --git a/woocommerce/content-product.php b/woocommerce/content-product.php new file mode 100644 index 0000000..95122fe --- /dev/null +++ b/woocommerce/content-product.php @@ -0,0 +1,71 @@ +is_visible() ) { + return; +} +?> +
  • > + get_categories( ', ', '' . _n( '', 'Categories:', 1, 'woocommerce' ) . ' ', '' ); ?> + +
  • -- 2.17.1