Privacy URL redirect | WordPress.org

[ad_1]

@norsubs

You can try this code snippet which I found here and updated with Members Directory URL:

add_filter( "um_redirect_home_custom_url", "um_011320_change_redirect_url", 10, 3 );

function um_011320_change_redirect_url( $home_url, $requested_user_id, $is_my_profile ) {

    if( um_is_core_page( "user" ) ){
        $redirect_url = um_get_core_page( 'members' ) . '/?um_profile_private=true';
        return $redirect_url;        
    }    
    return $home_url;   
}

add_shortcode( "um_redirect_back_link", function(){

    if( ! isset( $_REQUEST['um_profile_private'] ) ) return;
    return __( "That profile is private", "ultimate-member" );    
});

Install the code snippet into your active theme’s functions.php file
or use the “Code Snippets” plugin.

@missveronicatv

You are the best!! 🙂

Thank you very much!! 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer