You’ll want to sanitise your descriptions before using them in the URL. sanitize_title_with_dashes()
will be helpful. You’ll also need to make sure they’re unique (user’s can’t have the same URL).
https://codex.wordpress.org/Function_Reference/sanitize_title_with_dashes
Yes they are unique for every user.
Dont need for sanitise cause no spaces are allowed in description.
More help what exactly do i do to make this into reality?
And yeah if its possible just the link is the description my username will still be the same if possible.
In WordPress there’s user_login
, user_nicename
and display_name
.
In general, display_name
is used on the front end to display the user’s name. This might be the same as user_login
but more often it’s the user’s first name and last name.
user_login
is the string used to authenticate the user when logging in. user_nicename
is usually the same as user_login
but it is a sanitised version used in URLs so it may be different if user_login
contains special characters.
Using your description field in place of user_nicename
should be possible but it’s likely you’ll need to use custom code. I’m not aware of a plugin that will get this done for you.
Hope this helps.