How to Add Custom Navigation Menus in WordPress 3.0 Themes
SHARE THIS

Now that WordPress 3.0 is out here is a quick tutorial on how to add custom navigation to your themes.

The new custom navigation feature in WordPress 3.0 has to be my absolute favorite. This gives you the ability to add items like custom links, pages, and categories. The drag and drop interface makes it extremely simple to use. This feature will not be available in older themes unless the theme author updates that theme. In this article, we will show you how you can enable and install custom navigation menus in your themes.

2-Week 30-40% OFF Promo

How to enable Custom Navigation Menus in WordPress 3.0

Step 1.
Add the code below to your theme’s functions.php file:

[php]
add_theme_support( ‘menus’ );
[/php]

Step 2:
Once you have the code placed in your functions file, you can add it in your theme. You can add a menu anywhere you like to fit your designss need by pasting the code below:

[php]
<?php wp_nav_menu( array( ‘sort_column’ => ‘menu_order’, ‘container_class’ => ‘menu-header’ ) ); ?>
[/php]

The function that calls the custom menu is, wp_nav_menu. The arguments in the code above code are sort_column and container_class. The sort_column value tells WordPress to follow the order you pick in the options panel, and the container_class is the css styling class that you want for this specific menu.

Learn more about WordPress 3.0 custom menus:
Function Reference/wp nav menu
Appearance Menus SubPanel

19,612 Website Templates and Themes From $3