You might be able to use the edit_profile_url
filter:
add_filter( 'edit_profile_url, 'wpse419568_user_profile_redirect', 10, 3 );
/**
* Filters the URL for the user profile.
*
* @param string $url The profile URL.
* @param int $user_id The user ID.
* @param string $scheme The URL scheme (eg http, https, login, etc.).
* @return string The filtered URL.
*/
function wpse419568_user_profile_redirect( $url, $user_id, $scheme ) {
// Don't change the URL for admin users.
if ( ! current_user_can( 'manage_options' ) ) {
// Assumes that the profile URL uses the User ID. Adjust to suit
// your site's use case.
$url="/members/profile/" . absint( $user_id );
}
return $url;
}
Note: This code is untested and comes with no guarantee it will work. It’s meant as a starting point, not a finished solution. Test it on a disposable / test site first.
Related Posts:
- “Too many redirects” ONLY when trying to access wp-admin page
- Admin Page Redirect
- Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?
- Making a client area in WordPress – Any good tutorials or plugins?
- Wrong canonical link on wp-admin pages
- stop redirection on /wp-admin call to /wp-login
- wp-admin produces a 302 redirect to itself
- Users are redirected to homepage instead of wp-admin
- Unwanted redirect in admin area
- Login to wp-admin “redirect_to” points to wrong URL after migration
- wp-login.php — redirect logged in users to custom URL
- Can’t access wp-admin Internal Server Error 500
- Can’t access admin dashboard with wp-admin without /index.php after it
- Change Dashboard url
- WordPress subdomain wp-admin redirects to main domain
- Why is there an intermediate redirect to https://public-url.org/wp-admin?
- Prevent /wp-admin/ from redirecting to homepage?
- https://mydomain/wp-admin redirects to wp-login.php?redirect_to=https%3A%2F%2Fmydomain%2Fwp-admin%2F&reauth=1
- Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php
- WordPress (behind HAProxy and Jetty), not multisite, in sub folder – and /en/wp-admin/ keeps redirecting to /wp-admin/
- Created a new subdomain with same content. Should I add a redirect in my old subdomain?
- wp-admin – 404 after custom login form
- How to fix ‘WordPress redirection loop problem in wp-login.php page’?
- wp-admin 302 redirects
- Too many redirects after added SSL redirect on port 80 virtual host
- Can’t access wp-admin, redirects to http://%24domain/wp-admin/
- Unable to properly login
- Restrict access to admin-post.php
- Redirect an entire WordPress site on a subdomain, except wp-admin
- Admin sometimes redirects to HTTPS
- Too Many Redirects – WP-Admin Only
- WP Admin Login keeps redirecting to login
- CPU overload spam – redirect link to wp-admin and new post
- How to access wp-admin from original website after setting the domain redirect/forwarding
- WordPress /wp-admin redirect to wrong port in docker
- Login redirect_to url is pointing to a url with the port
- Redirect from wp-admin back to page
- Can’t access WP-Admin via HTTPS
- Wp-admin Redirection loop after moving to subdirectory
- Trying to login to my site redirects me to the first page
- Avoid executing a function (redirect) if I’m in the admin area
- stop customize.php redirect to login page if admin is not logged in
- wp-admin redirects to standard wordpress page
- I cannot go to http://novathon.cloud.reply.eu/wp-admin – always redirected to /wp-login
- Unable to log in as admin
- Random HTTPs redirections at admin area in shared hosting
- How can visitors redirect wp-admin to the homepage?
- Why when I click on a link into the WP admin panel I am redirected to a link that doesn’t contains wp-admin prefix, so I obtain 404 error
- Word press wp-admin redirecting to reauth=1
- sortable custom column in media library
- how do I force a single column layout in screen layout
- Sortable admin columns, when data isn’t coming from post_meta
- wp_list_table search box does not show
- How to remove the site health dashboard widget?
- How to Display Post Excerpts in Admin by Default?
- What is the capability that permits access to WP-Admin?
- WordPress in sub directory wp-admin problem
- Admin account only shows Profile and Dashboard with no activity
- Adding body class to login page?
- Edit a WordPress site without the username and password?
- Call to undefined function insert_with_markers
- How can I remove the new stats message? [closed]
- How to redirect to action on custom page within admin section
- Why can’t I exclude private posts from this query?
- Cannot Access Admin Area After Migration
- Modify wp-admin page header ‘viewport’ meta data
- The uploaded file exceeds!
- Where can I find admin-header.php file online?
- class-wp-hook.php on line 288
- How to disable categories/most used in ‘add new post’?
- Is it possible to create two different wp-admins for a wp website
- Am I able to change the name of /wp-admin/options-general.php?
- how to customize the default #adminmenu in wp-admin
- blocking the admin section (but still using admin-ajax.php)
- WP Admin messed up
- Why when I try to access to this old WordPress site it is opened the installation page?
- What do I need for testing a single script in admin
- Wp-Admin extremely slow!
- Run two wordpress on the same domain
- nothing comes up when i go to my website.com/wp-admin? Which files should I look for?
- How to remove some author fields from the edit comment page in wp-admin?
- When i try to open Localhost/wordpress/wp-admin . An Error appears ” Registration Has been Disabled” . No login page is shown in the browser
- Line-height of text in wp-admin
- Slow WP loading due to persistent version check, how to disable?
- Can I manage the photos that are pulled from Instagram before they are uploaded?
- How do I edit an add in wp_list_table and return to same page
- admin_post_nopriv_{$action} is secure?
- Form input values are empty after submit
- Adding custom classes to elements via the WYSIWYG
- Why does wordpress and my site create a downloadable file instead of allowing me to login?
- How to Fix WordPress Not Saving Settings?
- wp.media – drag&drop overlay stuck
- How to display status messages in admin panel
- Is there ever a legitimate reason for an outsider to access wp-admin
- Impossible User Registration
- PHP Fatal error: Uncaught Error: Cannot unset string offsets when trying to upload any file to media library
- Wp doesn’t save meta box data
- How Can I Prevent Admin User Role Loss?
- Only Admin receives email
- Admin utility classes?