- \'; foreach ($subcats as $sc) { $link = get_term_link( $sc->slug, $sc->taxonomy ); echo \'
- \'.$sc->name.\' \'; } echo \'
Monday, 26 August 2013
Woocommerce: How do I show subcategories from a specific category as text? Eg: Artists
Woocommerce: How do I show subcategories from a specific category as text? Eg: Artists References I am looking at this code, by NAME Refered from: Show Subcategories from a specific category function woocommerce_subcats_from_parentcat_by_NAME($parent_cat_NAME) { $IDbyNAME = get_term_by(\'name\', $parent_cat_NAME, \'product_cat\'); $product_cat_ID = $IDbyNAME->term_id; $args = array( \'hierarchical\' => 1, \'show_option_none\' => \'\', \'hide_empty\' => 0, \'parent\' => $product_cat_ID, \'taxonomy\' => \'product_cat\' ); $subcats = get_categories($args); echo \'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment