You could hook into template_redirect
action hook and redirect the users. I assume that you want to redirect the currently logged in user.
add_action( 'template_redirect', 'wpse314345_redirect_users' );
function wpse314345_redirect_users( $template ){
// Check if the user is logged in
if( is_user_logged_in() ) {
// Get the current user
$user = wp_get_current_user();
// Redirect the user
wp_safe_redirect( esc_url( site_url( 'member/' . $user->display_name) ) );
exit();
}
return $template;
}
You can use other action hooks too, but make sure the action isn’t too soon ( query not set up yet ) or too late ( header already sent ).
However this will redirect every request to that particular URL. You might want to also do additional checks, based on your needs.
Related Posts:
- Admin Page Redirect
- How to redirect a specific user after log-in?
- Force users to complete their profile after they register? How to
- Redirect after User Activation [closed]
- Redirecting user after updating profile?
- Redirect after login based on user role (custom login page)
- Redirect User to Homepage if no other redirect is specified
- Redirect after users complete profile form
- Rule to redirect non logged in User to Custom Registration/login Page in .htaccess file
- Redirect user to login before viewing custom post
- Redirect subscribers to last viewed page after log-in
- Redirect user after successful email change
- WP_User_List -> How to open a new edit-page in WordPress admin backend!
- How to stop redirect if user is already on correct page (Using Case Switch)
- WP not logging in at first time
- How redirect after registration?
- How to check User Role and redirect to specific page according to Role when login in WordPress?
- How can I do a url redirect to include a wordpress username?
- Redirect logged on user to a specific page based on wp user role, page id
- How to add array [closed]
- Redirect users after login
- Redirect user to login if not logged in, on specific pages
- redirect user to their profile after log in
- WordPress Redirect Specific User. Tired of Peter’s redirect Plugin its not working
- Redirect current user to their most recent custom post
- how redirect users to custom login page when “login to reply” is clicked? [duplicate]
- How to remember which page the user was on before logout?
- Specific Content on pages based on user
- Redirect current user
- Redirect based on log-in status per JavaScript
- Redirect user based on role when they try access a particular page
- How to programatically change username (user_login)?
- How to change user_login with wp-cli?
- Replacing the WordPress password validation
- alphabetically order role drop-down selection in dashboard
- WordPress auto login after registration not working
- Change the author slug from nickname to ID
- Retrieve all users from wordpress database via REST/JSON API
- How to order users alphabetically by their last name?
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- pre_user_query meta_query admin user list
- Return ID of authors who have at least one post
- How to list users that have written custom post types and hide the ones that have not?
- Front end user meta options for users
- Redirect to login page
- Find out when a user was created and display varied content depending on time since creation
- How to add user meta for all users
- Code to create a redirection after login?
- How can I allow users to sign up but prevent them from accessing the WordPress backend?
- Get User Role by ID not working
- How to delete all post and attachments of a user when I delete it?
- Force user to change their password on first log in of site using shortcode
- How to use Regex to add to a url?
- Remove admin menu links for multiple users by email
- C# user_nicename and Display name blank
- Redirect user to previous page after signup from custom form
- WP users page doesn’t show users count by role
- Move users and passwords from one wordpress site to another
- Get query parameters from external url and make a redirection
- Show different page for first time user
- Failed login attempts
- Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)
- Author comment count in author page
- 301 Redirection After Comment
- How to hide user profile fields based on the role of the viewed user?
- user_meta table in staging vs live site
- Privilege to recover trashed posts
- One Click Access To Users Account In WordPress?
- How to use `wp_insert_user` & `wp_insert_post` simultaneously without `headers already sent` error?
- Unexpected problems after importing WP data
- How to auto-generate names for guest users who leave comments?
- Edit text of WordPress “Register” button
- WordPress user role with create user capability?
- How to add extra field in profile page and show in myaccount?
- How do I redirect the browser to 404 page, if no posts are found in home page
- Perform multiple actions after wp_insert_user()
- My custom user metadata is only active for only admin but i want it to be active on all users especially customers
- How to get image path from id using SQL
- how to retrieve user via rest api using custom meta and/or email
- How to redirect if 404 error in wordpress then redirect 404.php url
- How to limit specific user ID to 5 comments per post?
- User Group Level Login
- REST API list_user
- Limit user description length in characters
- meta_query orderby sort multiple keys
- How to update user meta from php file?
- How to redirect new registrars to a custom registration page instead of WP default registration page?
- wp_update_user() returning http 500 internal server error
- redirect to a custom page
- Insert user register into my own user table instead of wp own user
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- Manage user profiles with WordPress
- Limit roles displayed in users.php depending on custom role
- Add a column before username in the users profile table
- Will mass deleting WP Users then reimporting CSV with the same userid break WP?
- Create a wordpress admin user and only let them edit and post blog posts?
- Shopping plugin with user groups [closed]
- WordPress – Security Question at Login from User’s Meta Data
- Remove My Account Menu items in Woocommerce based on user roles