From: Anthony Talarico Date: Tue, 12 Jan 2016 21:06:19 +0000 (-0500) Subject: testing dropdown restriction navigation X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=afcb1cd8d462815894cae3329739d7e1df0d9c02;p=WP-Plugins%2Fmichsci-products.git testing dropdown restriction navigation --- diff --git a/index.php b/index.php index 5e66988..e55a54f 100644 --- a/index.php +++ b/index.php @@ -440,9 +440,10 @@ function michsci_shortcode($atts) if ( isset($atts['cat']) ) { if ($prodCategory = get_term_by( 'slug', $atts['cat'], MICHSCI_CATEGORY_NAME ) ) { + if(!isset($_REQUEST[MICHSCI_CATEGORY_NAME])){ $_REQUEST[MICHSCI_CATEGORY_NAME] = $prodCategory->term_id; - $cat_id = $_REQUEST[MICHSCI_CATEGORY_NAME]; - + } + $cat_id = $prodCategory->term_id; } } echo '
@@ -533,6 +534,7 @@ function michsci_get_terms_dropdown($cat_id) function michsci_list_products() { global $wpdb, $wp; + $cat = get_term($cat_id, MICHSCI_CATEGORY_NAME); $args = array( 'posts_per_page' => -1, 'post_type' => 'miproduct' diff --git a/views/list_products.php b/views/list_products.php index 14e7aa5..6e6c069 100644 --- a/views/list_products.php +++ b/views/list_products.php @@ -1,25 +1,33 @@ - -
- name; - } + $term = get_term($cats, MICHSCI_CATEGORY_NAME); ?> + ID,'michsci_tag'); ?> + + + ID,'michsci_tag'); ?>
product grid small-12 medium-4 columnsend){ echo ' end';}?>"> -