How to implement separate sub-menus?

I want to implement two menus that work like this:

  Cars
 *Animals   <-selected
  Recipes
--
  Bear
 *Dog   <-selected
  Cat

So the top menu in the main menu, the the menu below is the sub-menu. Not all main menu items have sub-menus.

Read More

Is there an elegant way to implement this? Preferably, selecting the top menu item would select the first sub-menu.

wordpress version 3.03

Related posts

Leave a Reply

1 comment

  1. I can somehow understand what you are asking for but I think you should make this more clear. You already posted an example, but I think the main problem is: You connect some type of data to each other which is not known to wordpress.

    So as long as you don’t provide some hint how DOG is related to ANIMAL (okay, this looks obvious on first read, but how are those two menues connected to each other? Computers are dumb silly, so they always need hints, imagine?), the question can not be answered. Sorry.

    UPDATE:

    See the wp list pages() (WordPress Codex) and wp_page_menu() (WordPress Codex) functions. You can make use of those in your theme.