php - How to modify a menu to show sub-menus -


i have custom php menu made person, displays categories menu. however, need display subcategories well. tried adding hierarchical parameter didn't work. hoping assistance!

here code:

<ul> <?php /* categories wp e-commerce products */ $wpec_product_categories = get_terms( 'wpsc_product_category', 'hide_empty=0&parent=0&exclude=298'); $myarray = array(); foreach($wpec_product_categories $wpec_categories){     $myarray[$wpec_categories->term_id]['name'] = $wpec_categories->name;     $myarray[$wpec_categories->term_id]['slug'] = $wpec_categories->slug;     $myarray[$wpec_categories->term_id]['term_id'] = $wpec_categories->term_id; } foreach($myarray $wpec_categories1){     $wpec_term_name = $wpec_categories1['name'];     $wpec_term_slug = $wpec_categories1['slug'];     $wpec_term_id = $wpec_categories1['term_id'];     echo '<li> <a href="'.get_page_link(19).''.$wpec_term_slug.'" >'. $wpec_term_name.'</a></li>'; } ?></ul> 


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -