Logged in Member Menu – Paid Memeberships Pro

Home Forums Pro Support Logged in Member Menu – Paid Memeberships Pro

Topic Resolution: Resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #70419
    Martin MaldenMartin Malden
    Participant

    Hi there,

    I’m setting up a site with Paid Memberships Pro and using their Addon to generate a different navigation menu for logged in members. The logged in members menu is set up as a separate menu in the WP Appearance > Menus screen, and then the appropriate menu is displayed depending on whether the member is logged in or not.

    Can you tell me how I can get Responsive Menu Pro to recognise and render the ‘logged in members menu’ when members are logged in?

    Many thanks!

    Martin.

    #70423
    Kriti SharmaKriti Sharma
    Keymaster

    Hi Martin,

    Welcome to Responsive menu Pro Support Forum. Hope you are having a wonderful day.

    Sorry to say this, but this functionality is not present in the plugin right now. But if you like, I can forward this as the feature request to the development team and they will try to implement it soon.

    Regards,
    Kriti

    #70430
    Martin MaldenMartin Malden
    Participant

    Hi Kriti.

    Yes, please forward that as a feature request.

    In the meantime, I have removed the Paid Memberships Pro addon and added a filter to functions.php that displays the different menus depending on whether a user is logged in or not. I’ve deactivated Responsive Menu Pro and this works perfectly for the standard navigation menu.

    Will Responsive Menu Pro pick up this filter and display the alternative menu that way? The filter references the WordPress menu names as given in the Appearance > Menus screen, so if Responsive Menu Pro references those menu names it may work.

    Many thanks,

    Martin.

    #70438
    Kriti SharmaKriti Sharma
    Keymaster

    Hi,

    I have forwarded this as the feature request and I don’t understand by the following query, please explain:

    Will Responsive Menu Pro pick up this filter and display the alternative menu that way? The filter references the WordPress menu names as given in the Appearance > Menus screen, so if Responsive Menu Pro references those menu names it may work.

    Regards,
    Kriti

    #70440
    Martin MaldenMartin Malden
    Participant

    Hi Kriti,

    OK, so I have set up the following filter in functions.php:

    <?php
    
    function my_wp_nav_menu_args( $args = '' ) {
    
       if( is_user_logged_in() ) { 
    
           $args['menu'] = 'member_menu';
       } else { 
           $args['menu'] = 'main_menu';
       } 
       return $args;
    }
    
    add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );

    With Responsive Menu Pro deactivated and removed, that filter ensures that when a member is logged in they see the Member’s Menu and when they are not logged in they see the menu that’s available to general visitors. The appropriate menu is displayed depending on whether the visitor is logged in or not.

    Since that filter works with all WordPress themes my question is whether Responsive Menu Pro references wp_nav_menu and, if it does, would that filter achieve what I need.

    Cheers,

    Martin.

    #70448
    Kriti SharmaKriti Sharma
    Keymaster

    Hi Martin,

    I will have to contact the development team regarding this query. I will get back to you as soon as I hear back from them.

    Regards,
    Kriti

    #70451
    Martin MaldenMartin Malden
    Participant

    OK, great,

    Many thanks!

    Martin.

    #70467
    Kriti SharmaKriti Sharma
    Keymaster

    Hi Martin,

    I have talked to the development team and the code is working with our plugin too.

    Regards,
    Kriti

    #70470
    Martin MaldenMartin Malden
    Participant

    Hi Kriti,

    That’s great, many thanks!

    Cheers,

    Martin.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Logged in Member Menu – Paid Memeberships Pro’ is closed to new replies.