Custom Mobile Menu Breaks Mega Menu

Posted in: Newsmag
Post count: 6

Hello,

I am having some issues when it comes to setting a custom menu for the theme. I have edited td_menu.php in a child theme to include a Mobile Menu location like so:

    function hook_init() {
        register_nav_menus(
            array(
                'top-menu' => 'Top Header Menu',
                'header-menu' => 'Header Menu (main)',
                'footer-menu' => 'Footer Menu',
                'mobile-menu' => 'Mobile Menu'
            )
        );
    }

Then I have added the new mobile-menu to the location inside parts/menu-mobile.php.


wp_nav_menu(array(
                'theme_location' => 'mobile-menu',
                'menu_class'=> 'td-mobile-main-menu',
                'fallback_cb' => 'td_wp_no_mobile_menu',
                'link_after' => '<i class="td-icon-menu-right td-element-after"></i>',
                'walker'  => new td_walker_mobile_menu()
            ));

The mobile menu works as expected, but the mega menu no longer works. Do you have any idea why this might be? If I change the theme_location on menu-mobile.php then it works as expected. It seems to be that small change that breaks the mega menu functionality.

Thanks.

Post count: 6535

HI

The td_menu.php file cannot be overwritten in child theme as it’s a file from wp-booster which does not have support for child theme yet. Try to make the changes in main theme files and check how it goes.
Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newsmag’ is closed to new topics and replies.