Register New Menus in WordPress

WordPress Custom MenusRegister multiple custom navigation menus in the new custom menu editor of WordPress 3.0. This allows for the creation of custom menus. Users will no longer need any plugins to manage or customize their navigation menus.

However, not all themes are created equal. Many outdated themes don’t support custom menus. If you are married to your theme and it doesn’t support custom WordPress menus, then you can add them yourself. Here is how to add custom menus to your WordPress blog.

Register new menu in functions.php between the <?php and ?>

[php]register_nav_menu( ‘secondary’, ‘Secondary Menu’ );[/php]

Then go to header.php and add the new custom menu. Review the options for $args array in the reference below.

[php]<?php
$args = array(‘theme_location’=>’secondary’);
wp_nav_menu($args);
?>[/php]

Additional Resources:
http://codex.wordpress.org/Function_Reference/register_nav_menu
http://codex.wordpress.org/Function_Reference/wp_nav_menu

About Clifton Hatfield

Clifton is the kind of guy that can read code better than he can read a book and prefers it that way. He likes cold pizza, moving sidewalks, and Indiana Jones. Clifton co-founded Internet Lifestyle Network from his home office in 2012 and he believes that true leadership is to inspire.
0 comments