[wp-testers] wp_nav_menu() -vs- wp_page_menu()

Almost George WP-Testers List wp-testers-list at almostexciting.com
Wed Apr 7 21:58:13 UTC 2010


The twentyten theme uses wp_nav_menu() in the area where I expect Page
menu goes, and by default appears to display this with the Arial font
(noted for later). This worked fine while creating many pages.
However, after creating a custom Menu, and saving it with several
items, the wp_nav_menu() function now displays this custom Menu by
default. That was definitely unexpected.

I wasn't able to easily figure out how to force wp_nav_menu() to
forcibly show the Pages, so I replaced it with wp_page_menu()
(documented as the fallback, when apparently *no* custom Menus exist).

wp_page_menu() didn't display the items correctly, so I simply
duplicated the $args as passed to wp_nav_menu() in the theme
header.php ~ line 68.

This continued to look broken, so referencing the codex, I added
['menu_class'=>'menu-header'] to the args, to mimic ['container_class'
=> 'menu-header'] from the args in wp_nav_menu().

This fixed the layout, but now the menu items are rendered with the
Georgia font.

It wasn't immediately clear to me how to adjust wp_page_menu() to have
the same classes/whatnot applied to cause it to render the same as
wp_nav_menu(). It was also very strange that the menu suddenly changed
once I'd saved a custom menu (only after adding items), and there
wasn't an easy way to get it to force the fallback to Pages.

I'm very sorry if this is a known issue, of if this message is out of
place. The 3.0 Beta1 blog post said that this was the place to report
bugs, and I wasn't able to find a bug in trac that mentioned this
issue.

Thanks,

AlmostGeorge


More information about the wp-testers mailing list