Another use that I see is conditional menus based on login status: if your menu is very long, instead of creating multiple ones, you could simply create one and use the exclude parameter to customize each visible version.

There's a technical issue with that everyone should be aware of. Long menus break stuff :/

]]>Ihor Vorotnov on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-21480
Thu, 08 Mar 2012 22:52:39 +0000Ihor Vorotnov21480@https://wordpress.org/ideas/You may call me whatever you want, but I really think if you have loooooong menus - there's something wrong with your content organization and structure. There are some cases when you need them to be long, e.g. on my veterinary portal there's a list of all pets and every of them has all breeds listed. Yes, they are massive. But in this case it would be odd to use wp_nav_menu to build it.
]]>Ipstenu (Mika Epstein) on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-21477
Thu, 08 Mar 2012 20:08:19 +0000Ipstenu (Mika Epstein)21477@https://wordpress.org/ideas/

if your menu is very long, instead of creating multiple ones, you could simply create one and use the exclude parameter to customize each visible version.

Word of warning - Long menus can cause problems. This is a known issue in WP right now, and it's probably safer not to have one massive menu just yet.

The argument is already included in other functions for which your same arguments could be applied.

But those are different functions. wp_nav_menu() has completely different concept behind it. And its concept is to use menu editor to build the EXACT menu you need.

I'm not totally arguing against you proposal. I just think it will not work with the idea of building custom menus. It's a bit awkward if you manually create a menu and then somewhere on the site it does not look like it supposed to. It should be dead simple - create a menu, include it in your template and see it exactly how you configured it. That's what most of users expect it to be.

]]>Marventus on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-21474
Thu, 08 Mar 2012 19:05:29 +0000Marventus21474@https://wordpress.org/ideas/If you are adding wp_nav_menu() in different contexts it seems like you are techie / theme developer

I am not just thinking about me: I'm sure there are many non-developers out there that could find this feature useful.

wp_nav_menu() function allows you to call a custom walker (see reference). You can use it to achieve your task.

Walkers are for controlling HTML output. I use them all the time, but they seem highly overkill for the purposes described above, don't they?

If you need another menu - create it, it takes only few minutes in menu editor.

That may be your opinoin and/or way of going about it. However, I still think it would be nice to have the option to do it differently. THe argument is already included in other functions for which your same arguments could be applied. Yet, the argument is there. I am only asking to extend it to a very similar function.

]]>Ihor Vorotnov on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-21473
Thu, 08 Mar 2012 18:55:49 +0000Ihor Vorotnov21473@https://wordpress.org/ideas/If you are adding wp_nav_menu() in different contexts it seems like you are techie / theme developer, not an editor. And the case of this contextual exclusion is rather rare. wp_nav_menu() function allows you to call a custom walker (see reference). You can use it to achieve your task.

The whole idea of wp_nav_menu() is to make creating CUSTOM menus and including them in your theme easy and without any additional coding. If you need another menu - create it, it takes only few minutes in menu editor.

]]>Marventus on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-21470
Thu, 08 Mar 2012 18:31:31 +0000Marventus21470@https://wordpress.org/ideas/It could be useful if you want to reuse the menu in a different context but want to leave certain elements out. Another use that I see is conditional menus based on login status: if your menu is very long, instead of creating multiple ones, you could simply create one and use the exclude parameter to customize each visible version.
Based on the function's code, it seems easy enough to implement and could potentially help users save a lot of time in blog customization.
]]>Ihor Vorotnov on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-21468
Thu, 08 Mar 2012 18:07:08 +0000Ihor Vorotnov21468@https://wordpress.org/ideas/Why you need it? wp_nav_menu() outputs the menu created MANUALLY in Themes->Menus. If you don't need smth - just go and remove it from your menu. Or maybe I get your message wrong?
]]>Marventus on "Add exlude parameter to wp_nav_menu function"https://wordpress.org/ideas/topic/add-exlude-parameter-to-wp_nav_menu-function#post-20498
Thu, 20 Oct 2011 17:00:53 +0000Marventus20498@https://wordpress.org/ideas/Well, I guess the title says it all. I think this would make the function way more flexible. The 'exclude' parameter is present in other similar functions, such as wp_list_pages, wp_dropdown_categories, etc., so that will probably simplify its implementation.
Cheers!
]]>