From: Anthony Talarico Date: Mon, 21 Dec 2015 17:50:02 +0000 (-0500) Subject: nesting level 2 categories in dropdown X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c0b016e53aa468de68e31dead676315d07c9f563;p=WP-Plugins%2Fmichsci-products.git nesting level 2 categories in dropdown --- diff --git a/index.php b/index.php index bd100d9..b5f014e 100644 --- a/index.php +++ b/index.php @@ -173,11 +173,12 @@ function michsci_shortcode($atts) echo '
'; - echo michsci_get_terms_dropdown(); echo '
'; echo '
'; + + if ( $product_id = filter_var( $_REQUEST['product'], FILTER_VALIDATE_INT ) ) { michsci_show_product($product_id); } else if ( $cat_id = filter_var( $_REQUEST['category'], FILTER_VALIDATE_INT ) ) { @@ -194,8 +195,6 @@ function michsci_shortcode($atts) function michsci_get_terms_dropdown() { - - $taxonomyName = "michsci_category"; $parent_terms = get_terms($taxonomyName, array('parent' => 0, 'orderby' => 'name', 'hide_empty' => false)); $output =""; return $output; } + function michsci_list_products() { global $wpdb, $wp;