Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #377077

    Hey guys.

    I have a puzzle to solve re menus.
    Right now I have a website created with Enfold theme, and within the site I am running a private membership online course (drip-fed over 8 weeks)

    I am also using woo-commerce plus a bunch of other plugs-ins:
    Woochimp, Woocommerce Membership, Woocommerse Strip Gateway, and AffilateWP.

    Question: How do I customize menus so that:

    1: When client logs into private membership course, they see a whole new set of menu options relating to the course (different from the original website menu items.)

    2: How do I get rid of the menu items all together when they are in the shopping cart / checkout pages, without losing the original header and logo area?

    Right now I have 2 separate sites; one for the main website and one for the online course. (see links in private content).
    I want to merge them all in one site so as to take advantage of a unified database and all the automation/triggers supplied by the plug-ins.

    In keen anticipation :)

    #377475

    Hey solra93!

    1. Open up /enfold/includes/helper-main-menu.php and on lines 120 – 129 you should see this.

    $avia_theme_location = 'avia';
    $avia_menu_class = $avia_theme_location . '-menu';
    $args = array(
    	'theme_location'	=> $avia_theme_location,
    	'menu_id' 			=> $avia_menu_class,
    	'menu_class'		=> 'menu av-main-nav',
    	'container_class'	=> $avia_menu_class.' av-main-nav-wrap'.$icon_beside,
    	'fallback_cb' 		=> 'avia_fallback_menu',
    	'walker' 			=> new avia_responsive_mega_menu()
    );
    

    You’ll need to contact the support of your “Woocommerce Membership” plugin and ask if they have a function for checking if the current user is subscribed. You can add the check in like so.

    $avia_theme_location = 'avia';
    $menu_name = ''; // Use the theme location
    if ( /* check is user is subscribed */ ) { $menu_name = 'your-menu-slug-here'; }
    $avia_menu_class = $avia_theme_location . '-menu';
    $args = array(
    	'theme_location'	=> $avia_theme_location,
            'menu' => $menu,
    	'menu_id' 			=> $avia_menu_class,
    	'menu_class'		=> 'menu av-main-nav',
    	'container_class'	=> $avia_menu_class.' av-main-nav-wrap'.$icon_beside,
    	'fallback_cb' 		=> 'avia_fallback_menu',
    	'walker' 			=> new avia_responsive_mega_menu()
    );
    

    And then replace “your-menu-slug-here” with the name of the menu you want to switch out.

    2. You can use this CSS to hide the menus on your checkout pages.

    .woocommerce-cart .main_menu, .woocommerce-checkout .main_menu { display: none !important; }
    

    Best regards,
    Elliott

    #377528

    Hey Elliot,

    Thanks for that.
    I’m not much of a coder, so I will hand that on to my tech guy.

    Alternatively, would you suggest using Nav Menu Roles Plug-in to hide the public menu and replace with the private course menu once client has logged in?

    Also, I’m not attached to using Woocommerce Membership.
    Would you suggest another membership plug-in you know of that works with the strategy you suggested?

    Cheers :)

    #377896
    #378045

    Cheers! I shall look into that.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Advanced Menu Customization’ is closed to new replies.