Direct Link to user’s profile

7.51K viewsCore
0

Is there a way to put a direct link to the user’s profile in the the WP navigation menus? I saw that user’s directory uses http://ANSPRESS_USERS_PAGE_URL to add a link. I want to give users a link to get to their profile directly, is there a similar method for that?

1

Hi @peter and @Fred,
get the latest version from github.
I have added a new constant:

ANSPRESS_USER_PROFILE_URL

and you can directly add user profile link from menu editor.
I want to let you know that in upcoming version there will be direct link to user profiles. like: http://mydomain.com/user/rahul
and same for other permalinks:
for question: http://mydomain.com/question-title/
for list: http://mydomain.com/YOUR-BASE-PAGE

commented on answer

That’s great news! Will we be able to change/translate the “user” part of the slug? Even if not possible, this is already gonna be much better! Thanks for the hard work as usual!

Yes you can edit it from menu editor. 🙂
also I want to know how you translate ? I will suggest you to use this software : http://poedit.net/

Excellent, thank you both for this. Fred, I’m implemented your work around until the next version comes out. Thank you Rahul.

A small follow up on this one : the new constant is working great! Thanks! But every time the menu is modified, you have to input the constant again or it will be replaced by the logged in user profile link (and thus won’t change dynamically). Just have to know it but can be tricky for lots of users. 😉

Whether this feature(My profile Link) will check if the current user is logged in.Otherwise it will show the previous logged in user profile.

/user goes to the activity. /ANSPRESS_USER_PROFILE_URL doesn’t go to anything.

You are viewing 1 out of 4 answers, click here to view all answers.