Opened 17 years ago
Closed 11 years ago
#10968 closed enhancement (fixed)
Add container_element arg to wp_page_menu()
| Reported by: | stebbiv | Owned by: | paulwilde |
|---|---|---|---|
| Priority: | lowest | Milestone: | 4.4 |
| Component: | Posts, Post Types | Version: | |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: | template |
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
@
17 years ago
- Summary A new argument to replace the container div in wp_page_menu → Add container_element arg to wp_page_menu()
#7
@
13 years ago
- Keywords needs-refresh good-first-bug added; has-patch removed
- Priority normal → lowest
- Severity normal → minor
#8
@
13 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
@
11 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
@
11 years ago
We could also automatically use a nav element if the current theme supports html5.
#16
@
11 years ago
- Keywords good-first-bug removed
- Resolution fixed
- Status closed → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You forgot to replace the </div>