Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1405815
    JamesZL
    Participant

    Hi I have my primary menu set for my site

    Then function I would like is, when you click on the shop (from my primary menu), a whole new set of menu’s are on the header (like food categories menus instead of the usual “contact us” “about us” etc…)

    I use WooCommerce and I’ve tried all kinds of things and spent many hours trying to figure this out!

    Did try using menu swapper and I followed exactly the video-guide but it didn’t work either :S

    Appreciate the quick & simple feedback from the X-Theme guys so far!

    #1405987
    Lely
    Moderator

    Hi James,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1406841
    JamesZL
    Participant
    This reply has been marked as private.
    #1407123
    Darshana
    Moderator

    Hi there,

    Please check the following threads for a more specific solution.

    – (https://community.theme.co/forums/topic/different-menu-for-woocommerce/)
    – (https://community.theme.co/forums/topic/different-main-menu-when-in-woocommerce-shop/)

    Hope that helps.

    #1408712
    JamesZL
    Participant

    Hi

    I added in functions.php in my child theme:

    
    // =============================================================================
    // Sets Custom Menu For WooCommerce Shop 
    // =============================================================================
    
    add_filter( 'wp_nav_menu_args', 'custom_blog_menu' );
    
    function custom_blog_menu( $args ) {
      if ( x_is_product() || x_is_product_index() ) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'Custom Menu';
      }
      return $args;
    }

    Nothing new happened!

    Any ideas how to make it work?

    Thank you!

    #1409179
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Did you already created a menu named “Custom Menu”? I have checked your site and it appears that you did not create the menu (http://prntscr.com/ekjxy7). Please create a custom menu and make sure that the name is the same as the one you added in the code in your child theme’s functions.php file.

    Hope this helps. Please let us know how it goes.

    #1410113
    JamesZL
    Participant

    Hi, it worked like a charm!

    Great support, thank you!

    #1410606
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1405815 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>