Opened 14 years ago
Closed 14 years ago
#14684 closed feature request (wontfix)
Needed: Maximum number of menu items
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description
When recoding Matt's matala theme to support many of the newest features of WordPress, I discovered that there is no easy way to limit the number of menu items displayed by wp_nav_menu (and by extension, wp_page_menu or wp_list_pages).
This makes it difficult when you're using a menu design that is very limited in space like matala is. It would be nice if there was a way to simply send "max_items" or "number" or something to any of those three functions, to make it stop after displaying some number of menu items.
It would be super nice if this was tied back into the menus system and it wouldn't allow you to create that many menu items in the first place. This is optional though, just the max_items parameter would be super-useful.
Change History (3)
#2
@
14 years ago
I agree with Denis:
- Whether the menu is too large can easily and quickly be determined (more or less) by the user creating the menu. And will be: the first thing everyone does after creating a menu is reload the non-admin page to view it.
- It would be exasperating to have a theme limit how many menu items someone can add when she needs more items and knows (perhaps because they're small words) that they will fit.
- It's not going to work anyways. Given the variety of browsers, installed fonts, and accessibility settings, if your menu area could be too narrow it will be too narrow for someone, if you're using actual text (as opposed to images).
suggesting wontfix. max items isn't relevant, as it would invariably be based on english language words, which are typically shorter than others:
http://msdn.microsoft.com/en-us/library/aa292178(v=VS.71).aspx
English length (in characters) Additional growth for localized strings
1 to 4 100%
5 to 10 80%
11 to 20 60%
21 to 30 40%
31 to 50 20%
Over 50 10%