From d03db8d4eacae291eb306738c514b50a028b3161 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 21 Dec 2015 16:15:24 -0500 Subject: [PATCH] changed category listing url and added ids to category output --- index.php | 10 +++++----- views/list_categories.php | 14 ++++++++------ views/list_products.php | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/index.php b/index.php index 016136b..b2fa397 100644 --- a/index.php +++ b/index.php @@ -354,7 +354,7 @@ function michsci_shortcode($atts) //michsci_list_categories($cat_id); } else if ( !$catid_id && !$product_id ) { michsci_list_products(); - //michsci_list_categories(); + michsci_list_categories(); } $output = ob_get_contents(); @@ -475,7 +475,7 @@ function michsci_list_categories( $cat_id = null ) $taxonomy = MICHSCI_CATEGORY_NAME; $args = array( - 'hide_empty' => true, + 'hide_empty' => false, 'pad_counts' => true ); if ( $cat_id ) { @@ -495,9 +495,9 @@ function michsci_list_categories( $cat_id = null ) if ( $iterator == $totalTerms) { $term->end = true; } - $term->href = $current_url - . ( ( strpos( $current_url, '?' ) ) ? '&' : '?' ) - . "category=" . $term->term_id; + $term->href .= //$current_url +// ( ( strpos( $current_url, '?' ) ) ? '&' : '?' ) + "?michsci_category=" . $term->term_id; ++$iterator; } diff --git a/views/list_categories.php b/views/list_categories.php index 3451119..e54fb0e 100644 --- a/views/list_categories.php +++ b/views/list_categories.php @@ -1,16 +1,18 @@ - -
+
+
-
-
-
+
+
+ + - diff --git a/views/list_products.php b/views/list_products.php index 808d7b4..9e4fcbd 100644 --- a/views/list_products.php +++ b/views/list_products.php @@ -1,5 +1,5 @@ -
+
-- 2.17.1