Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #901

    In menu creating dialog, WordPress says: “Your theme supports 1 menu. Select which menu you would like to use..”

    Why is that so?

    Igor

    #33315

    Anybody has any idea about my problem?

    Igor

    #33316

    Hey,

    This seems to be a bug which can easily be fixed. Open up /framework/helper_functions/nav_menu.php and find this code:

    add_action( 'init', 'register_my_menu' );
    function register_my_menu() {
    register_nav_menu( 'theme-menu', __( 'Theme Menu' ) );
    }

    Replace it with this code:

    add_action( 'init', 'register_my_menu' );
    function register_my_menu() {
    register_nav_menus(
    array(
    'top-menu' => 'Top Navigation Menu',
    'theme-menu' => 'Main Navigation Menu'
    )
    );
    }

    You then need to set the menu locations and items in WP admin -> Appearance -> Menus :)

    Cheers,

    James

    #33317

    hello where do I find

    /framework/helper_functions/nav_menu.php

    Sorry but I do not know where to find

    #33318

    If you use the updated version of Newscast (Version 2.0) you’ll find nav_menu.php in your theme directory under:

    Newscast > framework > helper_functions > nav_menu.php

    please note every “>” indicates that it’s located in a subdirectory. Please open nav_menu.php with an editor and change the code.

    The Dude

    #33319

    Dude, thanks for posting this tutorial. The only thing better than WordPress 3.0’s custom menus is a cool theme that incorporates custom menus! Well done.

    #33320

    I spoke too soon… I’ve replaced the code in /framework/helper_functions/nav_menu.php and I’ve defined the two menus via the WordPress Menus dashboard.

    Unfortunately, the same menu is populating both menus on the site:

    http://173.83.124.155/

    The menu I’ve titled, “Main Nav” is populating both menu areas. The menu I’ve titled, “Smaller Top Nav” includes different pages and is selected as the “Top Navigation Menu,” but it’s not populating that area.

    Do I need to modify the header.php file to accommodate these custom menus?

    #33321

    Hey,

    If you’ve changed the code (as I posted above), then go to WP admin -> Appearance -> Menus and remove the option on the top left for whichever menu you don’t want to show.

    James

    #33322

    Works great… thanks… :)

    #33323

    Glad that it works now.

    The Dude

    #33324

    I changed the code as James suggested. Good: Now my Appearance>menu page shows that it supports two menus. I made one menu for pages (p menu) and one for categories (c menu). I added a page to the one and a cat to the other. I added both menus to the “Theme locations” box: p menu on top, c menu on the bottom. When I refresh my site, both top and bottom menus are showing the p menu item. I just bought the theme yesterday. Is this a bug or a feature?

    :) Rosemary

    #33325

    OK, I found the help I needed in the support file :) Menus must be named “First” and “Second”. I have my highlighter out and I’m reading the WHOLE file.

    Thanks,

    R

    #33326

    Glad that you solved your problem.

    The Dude

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Theme supports only one menu’ is closed to new replies.