User user id instead of login in profile url
-
Is there a way to redirect all profile page links so they use the user id, instead of user login/nicename? Some users have their email as their username, so we want to hide it.
So to go from
/forums/users/{login}to
/forums/users/{id}I was able to change the URLs so they point to the right place:
function bbp_custom_author_link( $url, $user_id, $user_nicename){ $url = site_url()."/forums/users/".$user_id; return $url; } add_filter( 'bbp_get_user_profile_url', 'bbp_custom_author_link', 10, 3);
But once you click on the link, you end up in a 404.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.