From: Anthony Talarico Date: Wed, 20 Jan 2016 15:07:44 +0000 (-0500) Subject: testing changes to tags X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=ffedcfa327b07ba99cda431e396e978e90f4cb26;p=WP-Themes%2Fmichsci.git testing changes to tags --- diff --git a/parts/sidebar-l.php b/parts/sidebar-l.php index c786cd2..cdf2dc5 100644 --- a/parts/sidebar-l.php +++ b/parts/sidebar-l.php @@ -9,24 +9,24 @@ "hierarchical"=>true, "parent"=>0 ); -// $cat_id = get_query_var('michsci_category'); -// -// $myPost = get_posts(array( -// 'post_type' => 'miproduct', -// 'tax_query' => array( -// array( -// 'taxonomy' => 'michsci_category', -// 'field' => 'term_id', -// 'terms' => $cat_id) -// )) -// ); -// -// foreach($myPost as $posts){ -// $term_list = wp_get_post_terms($posts->ID, "michsci_tag", array("fields" => "all")); -// foreach($term_list as $terms){ -// echo '' ."
"; -// } -// } + $cat_id = get_query_var('michsci_category'); + + $myPost = get_posts(array( + 'post_type' => 'miproduct', + 'tax_query' => array( + array( + 'taxonomy' => 'michsci_category', + 'field' => 'term_id', + 'terms' => $cat_id) + )) + ); + + foreach($myPost as $posts){ + $term_list = wp_get_post_terms($posts->ID, "michsci_tag", array("fields" => "all")); + foreach($term_list as $terms){ + echo '' ."
"; + } + } $tags = get_terms("michsci_tag", $args); foreach($tags as $tag){