• Hello,
    I tried to use the plugin with yootheme pro but it doesn’t work. Is there a way to make it work?

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

    (@megamenu)

    Hi hajerem,

    I am afraid not. Max Mega Menu only works with themes that follow standard WordPress coding guidelines/conventions. YooThemes use their own proprietary framework.

    Regards,
    Tom

    @hajerem the plugin work very well with YOOtheme Pro. Your issue are probably the ‘Menu Location’. Check if you selected the right location.

    @megamenu your answer is bit generic. YOOtheme Pro is a very professional written theme and follows very carefully all guidelines/conventions. The mentioned front-end framweork UIkit is a extremely solid, well documented and open source.

    Plugin Author megamenu

    (@megamenu)

    Hi @alexandergirod,

    Are you able to add widgets to your sub menus?

    My reference to not following standards is because there is code like this:

    <?php echo $this['widgets']->render('menu'); ?>

    Whereas the standard would simply be:

    <?php wp_nav_menu( array( 'theme_location' => 'main_menu' ) ); ?>

    Regards,
    Tom

    @megamenu I have to admit I don’t really get your question. Widgets in sub menus? Also I can’t find the code you provided. Searching the code for the terms widgets, menu and theme_location results in something like this:

    if (has_nav_menu($location)) {
    
                $menu = get_nav_menu_locations();
    
                ob_start();
                wp_nav_menu([
                    'theme_location' => $location,
                    'menu' => $menu[$location],
                    'split' => $location == 'navbar',
                ]);
    
                $widget = $this->createWidget([
                    'id' => "menu-{$sidebar}",
                    'type' => 'menu',
                    'content' => ob_get_clean(),
                ]);
    
                array_unshift($items, $widget);
            }

    in \wp-content\themes\yootheme\vendor\yootheme\theme-wordpress-widgets\src\WidgetsListener.php:112

    or this

    // Register menu locations.
        foreach ($theme->options['menus'] as $id => $name) {
            register_nav_menu($id, __($name));
        }
    
        // Add filter to menu arguments.
        add_filter('wp_nav_menu_args', function ($args) {
            return array_replace($args, array(
                'walker' => new MenuWalker(get_current_sidebar(), $args),
                'container' => false,
                'fallback_cb' => false,
                'items_wrap' => '%3$s',
            ));
        });

    in \wp-content\themes\yootheme\functions.php:115

    But I’m not a programmer, just a big fan of the theme and for a current project I’m using your plugin with YOOtheme and stumbled upon this thread.

    One real issue I had with the plugin/theme-combination was the menu location. So I created custom ones with your plugin and assigned the menu to the newly created ones.

    Is this what you where referring to?

    Thread Starter hajerem

    (@hajerem)

    @alexandergirod The problem that I cannot put any widget like text widget or image in the menu. since it is a mega menu, so I should be able to add many things to menu.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Max Mega Menu and yootheme pro’ is closed to new replies.