Adding Menu Support

With the most recent update to WordPress (3.6.1), you now need to add some menu support to your custom theme or you’ll get a lovely little message that falsely announces that your theme does not support menus. In actuality, you can leave this out of your files, allow the message to remain, and you’ll notice that you actually can use menus. For the way I use menus, this drives me crazy. If you wanted to allow your user to create a bunch of menus and have them assign it a location themselves, sure fine sure, then this is required. However, I like to keep menus fairly strict in my themes; I find this leaves less room for my users to inadvertently cause an issue in their site (assign a menu to a less-than-perfect location).

That said, I also hate that message that says my theme doesn’t support menus. Ergo, here’s how you remove it.

As with seemingly everything, this should be placed in your functions.php file.

function register_my_menus() {
  register_nav_menus(
    array(
      'top-nav' => __( 'Top Navigation' ),
      'foot-nav' => __( 'Footer Navigation' )
    )
  );
}
add_action( 'init', 'register_my_menus' );