Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1066921

    Hello.
    So i built a regular second menu in Enfold.
    I wanted to display it directly above the main menu and keep the mega – menu behaviour of enfold.

    In my functions.php i added a shortcode:

    function print_menu_shortcode($atts, $content = null) {
    	extract(shortcode_atts(array( 'name' => null, 'class' => null ), $atts));
    	return wp_nav_menu( array( 'menu' => $name, 'menu_class' => 'menu', 'echo' => false ) );
    }
    add_shortcode('menu', 'print_menu_shortcode');

    and in approx. line 157 of ‘helper-main-menu.php’ added the code:
    $output .= do_shortcode('[menu name="secondary-menu" menu_class="mysecondarymenu"]');

    The secondary menu shows up, but expanded with all the menu and submenu entries directly visible.

    What CSS markup do i have to add, so that the mega-menu behavior will be appended to the secondary menu?

    Or is my approach not the right one?

    if that is possible at all.

    #1067745

    Hey immopark2016,

    Best regards,
    Victoria

    • This reply was modified 7 years ago by Victoria.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.