This is the function that you need:
add_action( 'profile_update', 'custom_profile_redirect', 12 );
function custom_profile_redirect() {
if(is_admin()):
wp_redirect( trailingslashit( home_url() ) );
exit;
endif;
}
Just change the target of wp_redirect to whatever URL you want your users to go to. You can even add conditional logic to it if you only want this to happen for certain users, like the function below:
add_action( 'profile_update', 'custom_profile_redirect', 12 );
function custom_profile_redirect() {
if ( is_admin() && current_user_can( 'subscriber' ) ) {
wp_redirect( trailingslashit( home_url() ) );
exit;
}
}
Hope this helps! You can learn more about it from this tutorial I wrote.
Related Posts:
- Redirect after User Activation [closed]
- 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 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
- 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?
- Redirect /member/ to /member/user
- 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 allow an user role to create a new user under a role which lower than his level only?
- How to programatically change username (user_login)?
- How to get userid at wp_logout action hook?
- What’s the difference between the capability remove_users and delete_users?
- How to change user_login with wp-cli?
- Replacing the WordPress password validation
- How to hide media uploads by other users in the Media menu?
- Get users with atleast one post
- edit profile validation refreshes all field if missing wordpress
- How to order users alphabetically by their last name?
- Wp_User_Query not sorting by meta key
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- How to list users that have written custom post types and hide the ones that have not?
- What is the best way to avoid spammers registering to my blog?
- Authenticate user using Hashed Password in MySQL Query and C#
- Gravity Forms Submit form as another user
- Set default page for user account in admin
- Searchable meta value in user.php
- Find out who created a certain user?
- Locate authors on Google map version 3
- trying to list users & display first – last name
- Get users order by meta key with limit
- Hide everything on site for visitors except specific page IDs
- Add email addresses to already registered users
- How to set show admin bar front to true for all users?
- show text If special user is logged
- Multiple Backend Users as single Frontend User
- Forcing WordPress to work differently
- Force redirect not logged in user to (wp-login.php or wp-admin) for specific page
- Does WordPress Importer notify imported Users?
- Can user login details be used for other applications?
- Bulk create clean user_nicename from user_email with SQL function
- How can I attach a user to another user with user meta
- How do I protect user_activation_key?
- Log out users from every where
- Separate Out Real Users
- How to prevent a specific users’s profile photo (gravatar) from showing on the frontend to other users?
- WordPress REST Api: update user
- Hackers tried user name with wrong case [closed]
- How to set custom avatar for users?
- SQL Bulk update all WordPress user’s nicknames to firstname + lastname format
- How to set all external links from a certain user to “nofollow”?
- Show WordPress users in grid with image and name
- How can i login with user’s password in WordPress being an admin?
- Automatic Website user password generation
- How to hide some users to unlogged users [closed]
- List all users and current week entries
- Need to manually add multiple WP users with same e-mail address (with good reason)
- How to get current user on a multi site that is using domain mapping?
- Use members from 1 site on another one
- How do I change the home page to the registered user’s profile page
- Can I edit the database to change a login?
- User Meta stuff
- Is it possible to make specific posts editable by all authors?
- Redirect to current user page upon link click
- User can’t search himself on rest api
- How do I update user email from frontend input field?
- Cannot update newly added User field using wp_update_user
- Block editor completely gone for second of two super user
- How to create page for user?
- How to prevent multiple user accounts with the same meta field?
- How do I set a maximum upload size for a specific user role (Editor)
- members only products
- Modify the user data stdObject and add extra items to it?
- Create relationships between users or user roles
- User Permissions on custom post type
- update custom field user profile from front end form
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- I try to add informations to User profile
- Limit roles displayed in users.php depending on custom role
- Add a column before username in the users profile table
- Privacy in WordPress
- Create a wordpress admin user and only let them edit and post blog posts?
- Cant edit profile from frontend
- application password is missing