As of WordPress 3, users can now control more easily what appears in menus. Instead of having to show "all pages" in the menu, you can choose to show a selection of pages and/or categories, and/or other options (as we saw in Chapter 4).
Because we used the wp_nav_menu()
function in the header of the site (in the file header.php)
, if the user creates a menu in Appearance | Menus, the first menu they create will show up in that spot.
For example, here is the Muffin Top theme with the menu I created in Chapter 4:
It looks a little like a disaster, but that just means I need to clean up my CSS to allow for subpages. Another change in the CSS is that the list item's<li>s
are no longer given the page-item class, but instead get the menu-item class. Once I clean up my CSS and add a rollover menu, my nav is ready to go:
(You can find the CSS changes I made in the code packet for this chapter.)
If you want to have more than one navigation menu in your theme, you...