Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @kenadroid ,

    You can see in this article how to display the member directory to logged in users only by using the conditional menu.

    Plugin Support Aswin Giri

    (@aswingiri)

    Hello @kenadroid

    Please add following code snippets to your site to achieve the requirement:

    add_filter( 'um_prepare_user_results_array', function( $user_ids, $query_args ){
        if(!  is_user_logged_in() ){
            $user_ids = [];
        }
        return $user_ids;
    },30,2 );

    You can install code snippets plugin to add these to your site.

    Thread Starter kenadroid

    (@kenadroid)

    Hi @aswingiri,

    I am not t00 familiar with jQuery (at least that is my assumption with the code snippet),
    May I ask where should I put that code in?

    Thread Starter kenadroid

    (@kenadroid)

    Hi @gelieys

    I tried doing the conditional menu, however I can still access the members if I just changed it to website.com/members

    Not sure if I am missing anything here.

    Hi @kenadroid,

    Try restricting the page? Here’s an article that might help you.

    You can install the code snippet into your child-theme’s functions.php file
    or use the “Code Snippets” Plugin and paste the code.

    Plugin Support Aswin Giri

    (@aswingiri)

    @kenadroid

    Please install this plugin and once you activate plugin, navigate to wp-admin > snippets > add new. Add a title of your choice and paste codes below in the code input box.

    Once you have your title and code, click on the “Save and Activate” button at the bottom of the screen.

    add_filter( 'um_prepare_user_results_array', function( $user_ids, $query_args ){
        if(!  is_user_logged_in() ){
            $user_ids = [];
        }
        return $user_ids;
    },30,2 );
    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @kenadroid,

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show Member Grid Only After Logging In’ is closed to new replies.