The original urls for users look like /author/login/
Is it possible to replace login by user’s id?
In my dream urls should become to /users/34/
(34 is user id).
Thanks.
The original urls for users look like /author/login/
Is it possible to replace login by user’s id?
In my dream urls should become to /users/34/
(34 is user id).
Thanks.
You must be logged in to post a comment.
you need 3 simple functions and hooks
first change the author base:
then add users to query_vars:
then add the new rewrite rule:
Now if you don’t know how to use this, just copy all of the code and paste in your theme’s functions.php file.
You could use an htaccess rule to rewrite /users/34 to /?author=34
I built a plugin to do this. A friend wanted to hide his author URL’s as he didn’t like the fact they were displaying his author’s usernames. I decided to go one further and allow any user to set their own URL. It redirects their old author pages. https://wordpress.org/plugins/wp-custom-author-url/