• Resolved govindamma

    (@govindamma)


    installed the max mega menu plugin in my wordpress site and i used the header.php file to display the menu code “
    if (class_exists(‘Max_Mega_Menu_Walker’)) { $args = array( ‘menu’ => ‘Main Memu’, ‘container’ => ‘div’, ‘container_class’ => ‘collapse navbar-collapse’, ‘menu_class’ => ‘nav navbar-nav ml-auto’, ‘walker’ => new Max_Mega_Menu_Walker() ); wp_nav_menu($args); }
    else { // Handle the error gracefully
    error_log(‘Max_Mega_Menu_Walker class not found.’);
    // Display a fallback message or alternative menu if needed
    echo ‘Error: Mega Menu could not be loaded.
    ‘;
    }”

    but is shows else part

    • This topic was modified 1 month, 4 weeks ago by govindamma.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi govindamma,

    Your call to wp_nav_menu is missing the ‘theme_location’ parameter (and this is the only parameter that is/should be used), you can find the correct php to use under Mega Menu > Menu Locations. Expand a location and go to the Display Options tab. In there you will find the php code.

    Regards,
    Tom

    Thread Starter govindamma

    (@govindamma)

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.