• Hi
    I have installed the Wen Business Theme and now want to use Max Mega Menu plugin. But it does not work. Obviously because of the structure of the wp_nav_menu in this theme. Would you guide me how to use mega menu in this theme?

    Here is the header.php:

    <?php
    /**
     * The default template for displaying header
     *
     * @package WEN Themes
     * @subpackage WEN Business
     * @since WEN Business 1.0
     */
      /**
       * wen_business_action_doctype hook
       *
       * @hooked wen_business_doctype -  10
       *
       */
      do_action( 'wen_business_action_doctype' );?>
    <head>
    <?php
      /**
       * wen_business_action_head hook
       *
       * @hooked wen_business_head -  10
       *
       */
      do_action( 'wen_business_action_head' );
    ?>
    <?php wp_head(); ?>
    </head>
    <body <?php body_class(); ?>>
    <?php
      /**
       * wen_business_action_before hook
       *
       * @hooked wen_business_page_start - 10
       *
       */
      do_action( 'wen_business_action_before' );
    ?>
      <?php
        /**
         * wen_business_action_before_header hook
         *
         * @hooked wen_business_header_top_content - 5
         * @hooked wen_business_header_start - 10
         *
         */
        do_action( 'wen_business_action_before_header' );
      ?>
        <?php
          /**
           * wen_business_action_header hook
           *
           * @hooked wen_business_site_branding - 10
           *
           */
          do_action( 'wen_business_action_header' );
        ?>
      <?php
        /**
         * wen_business_action_after_header hook
         *
         * @hooked wen_business_header_end - 10
         *
         */
        do_action( 'wen_business_action_after_header' );
      ?>
      <?php
        /**
         * wen_business_action_before_content hook
         *
         * @hooked wen_business_add_featured_slider - 5
         * @hooked wen_business_add_breadcrumb - 7
         * @hooked wen_business_content_start - 10
         *
         */
        do_action( 'wen_business_action_before_content' );
      ?>
        <?php
          /**
           * wen_business_action_content hook
           *
           */
          do_action( 'wen_business_action_content' );
        ?>

    and here is the header.php in the ~inc\hook directory:

    <?php
    if( ! function_exists( 'wen_business_site_branding' ) ) :
    
      /**
       * Site branding
       *
       * @since  WEN Business 1.0
       */
      function wen_business_site_branding(){
        ?>
        <div class="site-branding">
          <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
            <?php
              $site_logo = wen_business_get_option( 'site_logo' );
             ?>
             <?php if ( ! empty( $site_logo ) ): ?>
              <img src="<?php echo esc_url( $site_logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" />
             <?php else: ?>
              <?php bloginfo( 'name' ); ?>
             <?php endif ?>
          </a></h1>
          <?php
            $show_tagline = wen_business_get_option( 'show_tagline' );
           ?>
           <?php if ( 1 == $show_tagline ): ?>
            <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
           <?php endif ?>
        </div><!-- .site-branding -->
        <div id="site-navigation" role="navigation">
            <?php
              wp_nav_menu( array(
                'theme_location'  => 'primary' ,
                'container'       => 'nav' ,
                'container_class' => 'main-navigation' ,
                )
              );
            ?>
        </div><!-- #site-navigation -->
        <?php
    
      }
    
    endif;
    add_action( 'wen_business_action_header', 'wen_business_site_branding' );
    if( ! function_exists( 'wen_business_mobile_navigation' ) ) :
      /**
       * Primary navigation
       *
       * @since  WEN Business 1.0
       */
      function wen_business_mobile_navigation(){
        ?>
        <a href="#mob-menu" id="mobile-trigger"><i class="fa fa-bars"></i></a>
        <div style="display:none;">
          <div id="mob-menu">
              <?php
                wp_nav_menu( array(
                  'theme_location'  => 'primary',
                  'container'       => '',
                ) );
              ?>
          </div><!-- #mob-menu -->
        </div>
        <?php
      }
    endif;
    add_action( 'wen_business_action_before', 'wen_business_mobile_navigation', 20 );
    if( ! function_exists( 'wen_business_header_top_content' ) ) :
      /**
       * Header top content
       *
       * @since  WEN Business 1.0
       */
      function wen_business_header_top_content(){
        $social_in_header = wen_business_get_option( 'social_in_header' );
        $search_in_header = wen_business_get_option( 'search_in_header' );
        ?>
        <?php if ( ( 1 == $social_in_header && wen_business_is_social_menu_active() ) || 1 == $search_in_header ): ?>
          <div id="header-top-content">
            <div class="container">
              <div class="header-top">
                  <div class="header-top-inner">
                    <?php if ( 1 == $social_in_header ): ?>
                      <?php the_widget( 'WEN_Business_Social_Widget', array( 'icon_size' => 'small' ) ); ?>
                    <?php endif ?>
                    <?php if ( 1 == $search_in_header ): ?>
                      <div id="header-search-form">
                        <?php get_search_form(); ?>
                      </div><!-- #header-search-form -->
                    <?php endif ?>
                  </div><!-- .header-top-inner -->
              </div><!-- .header-top -->
            </div><!-- .container -->
          </div><!-- #header-top-content -->
        <?php endif ?>
        <?php
      }
    endif;
    add_action( 'wen_business_action_before_header', 'wen_business_header_top_content', 5 );

    https://www.ads-software.com/plugins/megamenu/

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

    (@megamenu)

    Thread Starter amirrzd

    (@amirrzd)

    Hi
    I followed step 1 and 2 as it was said.
    Then I enabled the plugin.
    Then enabled Max Mega Menu for my main menu.

    But it’s not working. There is no menu now; All the links in the menu are listed under each other with no style.

    I need to mention that I use Polylang and I have two different languages enabled on my site.

    Also in “Menu Location” in “Mega Menu” menu for my main menu there is this suggestion:
    PHP Function:
    <?php wp_nav_menu( array( 'theme_location' => 'primary___fa' ) ); ?>

    And my homepage url for Fa-IR language is : /fa/????-????/
    En-US: /en/home

    Now how should I resolve this?

    Plugin Author megamenu

    (@megamenu)

    Hi,

    Please post a link to your site so I can take a look. Do not worry about the PHP function, that is an oddity that appears when PolyLang is enabled.

    Regards,
    Tom

    Thread Starter amirrzd

    (@amirrzd)

    I’m working on local. If you tell me where to look for the problem, that would be great.

    Plugin Author megamenu

    (@megamenu)

    HI Amir,

    Please check https://www.maxmegamenu.com/documentation/troubleshooting/#theme-editor-not-working

    You could also try disabling all other plugins, clearing the CSS cache (under Mega Menu > Tools) or changing the CSS output to ‘Output in head’ (also under Mega Menu > Tools).

    Regards,
    Tom

    Thread Starter amirrzd

    (@amirrzd)

    Hi
    Icouldn’t find the problem.
    I’ve moved the site to a host. Would you please take a look?
    https://goo.gl/PCA3Vq

    Plugin Author megamenu

    (@megamenu)

    Hi Amir,

    Thanks for the link.

    MMM is not currently activated for the top menu (or the main menu), your theme is in total control over the menus at the moment.

    Please can you:
    1. Disable MMM completely (it’s not doing anything at the moment)
    2. Fix the default theme menus (you might need to contact your theme developer for help on that, but this might help(?) https://screencast.com/t/A3YxIS6a9j ).
    3. Once the default menus are fixed, enable MMM and it should start working.

    Regards,
    Tom

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using Mega Menu in Wen Business Theme’ is closed to new replies.