Opened 15 years ago
Closed 9 years ago
#10968 closed enhancement (fixed)
Add container_element arg to wp_page_menu()
Reported by: | stebbiv | Owned by: | paulwilde |
---|---|---|---|
Milestone: | 4.4 | Priority: | lowest |
Severity: | minor | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | template | Cc: |
Description
I have added a new argument to the wp_page_menu template tag so it replaces the container div with another HTML element.
This is useful when migrating to HTML 5 and you want to use the <nav> element.
Attachments (5)
Change History (22)
#2
@
15 years ago
- Summary changed from A new argument to replace the container div in wp_page_menu to Add container_element arg to wp_page_menu()
#7
@
11 years ago
- Keywords needs-refresh good-first-bug added; has-patch removed
- Priority changed from normal to lowest
- Severity changed from normal to minor
#8
@
11 years ago
Refreshed patch.
I've opted for "menu_element" rather than "container_element", as container suggest a separate container outside of the menu when compared to wp_nav_menu.
#14
@
9 years ago
In [34280], it looks like $tag
is created but not used. The attached patch would also add $menu_tag
to the changelog.
#15
@
9 years ago
We could also automatically use a nav
element if the current theme supports html5.
#16
@
9 years ago
- Keywords good-first-bug removed
- Resolution fixed deleted
- Status changed from closed to reopened
Let's also create a little parity with wp_nav_menu
and use container
for the argument name instead of menu_tag
.
10968.patch combines @dlh's .2 patch with the argument name change.
You forgot to replace the </div>