With the arrival of WordPress 3.0 creating a custom menu in WordPress got a whole lot easier. In fact the power and flexibility of the menus are outstanding.
What we will do today is create a menu system, which will include subcategories in a dropdown menu.
It must be mentioned that your theme must be able to use Menus, so if you have an older theme you wont be able to do this, you should try upgrading the theme, Themeforest do some awesome premium themes.
Food Glorious Food
You can put pages, posts, tags, categories and custom links on a menu, but for this example we will just be using categories and posts.
We will use the example of a Recipe site. First off start by creating a category, in this case call it Recipes
Then create a new category, which will be a subcategory of Recipes, so lets call it Salads. But before you press Add New Category, change the Parent dropdown to say Recipes, this will attach it to the Recipes category.
If you want more subcategories, simply repeat the above step, but for now we will just stick with one.
Now go to your Menus section under Appearance.
If you have not already done so, create a new menu, by entering a name (doesn’t matter what, lets call it Main Menu) in the box on the right and pressing Create Menu. Then, in the Theme Location box, select it as your Primary Menu and press Save,
In your Category box on the same page, select View All, and then select Recipes and Salads and press Add to Menu. Note: if you cant see this, press Screen Options at the top right and tick the box named Categories.
You will see that they will appear in a list on the right, you can change the order of menu items by dragging and dropping them.
In order to make the menu on your website into a drop down list, make sure that Salads is below Recipes and then drag it slightly to the right so that it is offset. Save menu.
What this will do is on your website the navigation will say Recipes and when you hover over it, Salads will appear.
Now when you click salads, all posts that have been allocated to the Salads category will appear.
Now its just a matter of repeating this, so create a category called Desserts (Beef, Pork, whatever you want!) and assign it to the Recipe category.
Go to the Menu section and click it in the category list and add to menu.
Re-arrange so that it is under Recipes and slightly to the right. Save menu.
And there you have a simple, quick dropdown menu that is easily updated and changed. You can create a menu system with Posts, Pages, Categories and Tags or a mixture of them all!