Customize ‘Edit My Profile’ URL in WordPress Admin Bar
Tweet Follow @3pixelssolutionA lot of sites have custom profile pages (not the general one you find in the WordPress admin > Users > Your Profile/Edit My Profile). Profile After building an awesome edit profile page – your users log in, see the WordPress admin bar, click “Edit My Profile” and they end up at the WordPress general edit profile – not the one you want.
No worries – you can easily customize the URL in the WordPress Admin by adding the following code to your theme’s functions.php file:
[php]
/**
* Customize Edit Profile URL in WordPress Admin Bar
* @param string $scheme The scheme to use. Default is ‘admin’. ‘http’ or ‘https’ can be passed to force those schemes.
*/
add_filter( ‘edit_profile_url’, ‘pxl_custom_profile_url’, 10, 3 );
function pxl_custom_profile_url( $url, $user_id, $scheme ) {
$url = site_url( ‘/edit-profile’ );
return $url;
}
[/php]