• I have been trying to get menu to work as Primary Menu but it will just not play. It does work as a shortcode but not as part of main menu. Here is code from header.

    Am I missing something???

    Thanks
    Raddles

    <?php if (theme_get_option(‘theme_use_default_menu’)) { wp_nav_menu( array(‘theme_location’ => ‘prmary-menu’) );} else { ?><nav class=”art-nav”>
    <div class=”art-nav-inner”>
    <?php
    echo theme_get_menu(array(
    ‘source’ => theme_get_option(‘theme_menu_source’),
    ‘depth’ => theme_get_option(‘theme_menu_depth’),
    ‘menu’ => ‘primary-menu’,
    ‘class’ => ‘art-hmenu’
    )
    );
    get_sidebar(‘nav’);
    ?>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Raddles,

    The call to “theme_get_menu” (which is a custom function, I assume goes on to call wp_nav_menu), can be replaced with the PHP code for the primary menu. You can find that code under Mega Menu > Menu Locations.

    The problem is that it’s missing the “theme_location” parameter which is required for MMM to work. There’s some relevant information on this page:

    https://www.megamenu.com/documentation/custom-theme-integration/

    Regards,
    Tom

    Tom,
    Thanks will look at that tomorrow and let you know how I get on.
    Raddles

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Will not display as primary menu.’ is closed to new replies.