Opened 14 years ago
Closed 14 years ago
#13997 closed enhancement (wontfix)
wp_nav_menu enhancement
Reported by: | Kaiey | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Menus | Keywords: | needs-patch 2nd-opinion dev-feedback |
Focuses: | Cc: |
Description
Additional parameters need to be added to wp_nav_menu.
When trying to convert my theme that used wp_list_pages to generate navigation to wp_nav_menu I noticed I was unable to list the children of ("child_of" parameter) a specific menu item.
This was problematic as my theme displayed the children pages for the parent of the current page.
wp_nav_menu should be extended to include as mentioned at http://www.wptavern.com/forum/general-wordpress/1506-any-news-v3-2.html#post14806
<?php $args = array( 'depth' => 0, 'show_date' => , 'show_pages' => 0, // defaults to TRUE, set to FALSE to display a menu of only cats or links 'show_cats' => 0, // defaults to FALSE, set to TRUE to include categories 'show_linkcats' => 0, // defaults to FALSE, set to TRUE to include links (by link category) 'date_format' => get_option('date_format'), 'child_of' => 0, 'child_of_cat' => 0, // categories that are children of specified Category ID 'child_of_linkcat' => 0, // links that are children of specified LinkCat ID 'exclude' => , 'exclude_cat' => , // categories to exclude, if including categories 'exclude_linkcat' => , // link categories to exclude, if including links 'include' => , 'include_cat' => , // categories to include explicitly; used with show_cats 'include_linkcat' => , // link categories to include explicitly; used with show_linkcats 'title_li' => __('Pages'), 'echo' => 1, 'authors' => , 'sort_column' => 'menu_order, post_title', 'link_before' => , 'link_after' => , 'exclude_tree' => , 'exclude_cat_tree' => , // exclude specified category tree; used with show_cats 'exclude_linkcat_tree' => // exclude specified link category tree; used with show_linkcats
Change History (9)
#3
@
14 years ago
- Keywords menu extension children removed
- Milestone changed from 3.0.1 to Future Release
- Priority changed from high to normal
#4
follow-up:
↓ 5
@
14 years ago
- Keywords needs-patch added
- Milestone changed from Future Release to 3.1
It's ridiculous that the new menu system doesn't include all of the functionality that is in wp_list_pages, wp_list_categories and wp_page_menu. This functionality needs to be included in the next release.
#5
in reply to:
↑ 4
;
follow-up:
↓ 6
@
14 years ago
Replying to kaiey:
It's ridiculous that the new menu system doesn't include all of the functionality that is in wp_list_pages, wp_list_categories and wp_page_menu. This functionality needs to be included in the next release.
The key difference is that the output of those other functions cannot be customized in the admin; the nav menus can. So you don't need arguments to include or exclude certain pages, categories, etc., because all of that is done with the admin UI.
#6
in reply to:
↑ 5
@
14 years ago
Replying to filosofo:
Replying to kaiey:
It's ridiculous that the new menu system doesn't include all of the functionality that is in wp_list_pages, wp_list_categories and wp_page_menu. This functionality needs to be included in the next release.
The key difference is that the output of those other functions cannot be customized in the admin; the nav menus can. So you don't need arguments to include or exclude certain pages, categories, etc., because all of that is done with the admin UI.
While I can understand why this functionality may of been overlooked, it's just stupid to expect users to create multiple menus for menus with the same content. Say you wanted to reuse the header navigation menu for a site within the footer (breadcrumb-style), but want to exclude irrelevant menu items - you shouldn't have to create an entirely new menu.
3.0.1 will be a maintenance release.
Also related to #13793