Support » Themes and Templates » Adding WP 3.0 menu to old theme

  • How do I enable / add the custom menu functionality to my existing WordPress theme?

    I’m using Grid Focus and my blog url is

    Specifically, I want to add custom menu functionality at the top right (where my About, Contact are now), and in my navigation bar (where I currently have my search box).

    Help? Thanks

Viewing 1 replies (of 1 total)
  • The function to use is wp_nav_menu. For a basic implementation, this should work:

    1. First, enable theme support for navigation menus by adding this to functions.php:

    function your_function_name() {
    add_theme_support( 'menus' );
    add_action( 'after_setup_theme', 'your_function_name' );

    2. Drop the following line into your header.php file where you want the menu to appear:

    <?php wp_nav_menu( array( 'menu' => 'header', 'container_class' => 'menu-header' ) ); ?>

    Note the 'menu' => 'header' bit. This means that the name of the menu to be displayed here is header.

    3. Go to your admin area and select Appearance > Menus. Create a menu and call it Header. It should now appear in your theme.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding WP 3.0 menu to old theme’ is closed to new replies.