From 8dcb618a1febadc3bdab703aa16f72089e5dca0e Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 12 Jan 2016 14:08:08 -0500 Subject: [PATCH] adjusting dropdown for shortcode --- index.php | 30 +++++++++++++++++++----------- views/list_categories.php | 17 ++--------------- views/list_products.php | 17 ++++++----------- 3 files changed, 27 insertions(+), 37 deletions(-) diff --git a/index.php b/index.php index 908eba6..d9b29f9 100644 --- a/index.php +++ b/index.php @@ -441,12 +441,13 @@ function michsci_shortcode($atts) if ( isset($atts['cat']) ) { if ($prodCategory = get_term_by( 'slug', $atts['cat'], MICHSCI_CATEGORY_NAME ) ) { $_REQUEST[MICHSCI_CATEGORY_NAME] = $prodCategory->term_id; + $cat_id = $_REQUEST[MICHSCI_CATEGORY_NAME]; + } } - echo '
Search Products
'; - echo michsci_get_terms_dropdown(); + echo michsci_get_terms_dropdown($cat_id); echo '
-
- + diff --git a/views/list_products.php b/views/list_products.php index 6b5b37b..b58306f 100644 --- a/views/list_products.php +++ b/views/list_products.php @@ -2,15 +2,13 @@
- - ID,'michsci_tag'); ?>
product grid small-12 medium-4 columnsend){ echo ' end';}?>"> @@ -31,11 +29,8 @@
- -- 2.17.1