Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #718142

    djpickthall
    Participant

    Hi there, i am wondering how you create the menu that is seen in the WooCommerce shop in the integrity demo (http://theme.co/x/demo/shop/integrity/). I want to recreate the change in menu when the shop is selected from the main site. Once in the shop the menu changes to; Integrity Home (which takes you back to the main site with the usual menu), Shop Home, Checkout, My Account. Thanks in advance for your help.

    Daniel

    #718285

    Darshana
    Moderator

    Hi there,

    Thanks for writing in. This plugin may suit your needs (https://wordpress.org/plugins/page-specific-menu-items/). Check the FAQ before using it (https://wordpress.org/plugins/page-specific-menu-items/faq/)

    Also you may find the following thread useful (https://community.theme.co/forums/topic/different-menu-for-woocommerce/).

    Hope that helps.
    Cheers!

    #718813

    djpickthall
    Participant

    Thanks so much for the quick reply and info. That helped. One last question. I’m not sure how to make the menu link, Integrity Home, that sends the visitor back to the main home page of the website. More specifically, i’m not sure how to make a page that i can make a menu item that will link back to the home page. Thanks again for all the help, you guys are great 🙂

    Daniel

    #718826

    Thai
    Moderator

    Hi Daniel,

    You can add the Custom Links menu item: http://i.imgur.com/G7atlHm.png.

    Insert your home page URL to the URL field.

    Hope it helps 🙂

    #727052

    djpickthall
    Participant

    Hi there, I have been using the Page Specific Menu Items plugin to adjust my menu when in the woocommerce shop section of my site. It is having issues with some of the woocommerce pages and doesn’t implement the menu properly on those pages. All other pages not related to woocommerce work ok. I disabled the plugin.

    I tried the code from the thread you suggested;

    // =============================================================================
    // 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;
    }

    It said that this code would make all pages related to woocommerce show the specific menu i have selected for when people are in the shop but it only works when on the shop page. If i go to the cart, checkout or my account, the menu doesn’t show as i wanted. It shows the normal menu for the rest of the site. I tried to put the other code where it specified the shop, in multiple times on the functions.php page and just changed ‘shop’ to ‘cart’ etc but then it came back with a crash page when i tried to load the site again.

    // =============================================================================
    // Sets Custom Menu For WooCommerce Shop
    // =============================================================================

    add_filter( ‘wp_nav_menu_args’, ‘custom_blog_menu’ );

    function custom_blog_menu( $args ) {
    if ( x_is_shop() ) {
    $args[‘theme_location’] = ‘primary’;
    $args[‘menu’] = ‘Shop’;
    }
    return $args;
    }

    Is there any way to make just my woocommerce pages show the menu i want to show when in the shopping section of the site?

    Also the checkout page for woocommerce doesn’t load the right page, it just reloads the current page you are on. Could this be an x theme issue or a woocommerce issue?

    Thanks in advance

    Daniel

    #727191

    Rue Nel
    Moderator

    Hello Daniel,

    Please update your code and try this one:

    // =============================================================================
    // 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() || is_page(123) || is_page(456) ) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'Custom Menu';
      }
      return $args;
    }

    Please notice that we have used is_page({ID}). The id represents the page ID of the checkout page and the my account page. In your case, you have to replace it with the correct page ID. To locate the page ID, please check it out here: https://community.theme.co/kb/how-to-locate-post-ids/

    To assist you better with the check out page issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    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.

    Thank you.

    #727544

    djpickthall
    Participant

    That worked perfectly thank you so much. I figured out the checkout page. It was either because i didn’t put anything in the cart or because i was doing it from the customize section. On the normal front end it is all working now so thank you for helping me out.

    Daniel

    #727599

    Prasant Rai
    Moderator

    You’re welcome! We are just glad we were able to help you out.