Username Variable in custom links?

Question

I’m trying to use custom links in the php code to link to buddypress profile pages.

Basically, I need a way to create a username constant so I can make links like

domain.com/members/–username–/profile
domain.com/members/–username–/settings
domain.com/members/–username–/other

with –username– being the constant which changes the currently logged in user who clicks the link?

I Am sure this could be done in functions.php with a rewrite code but not sure where to begin.

If anyone could help it would be majorly appreciated… This has been racking my brain for weeks. I have no problems implementing the code… Just no idea how to create it?

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/username-variable-in-custom-links/">

Username Variable in custom links?</a>
0
, , Crafty Mc 2 weeks 0 Answers 13 views 0

Leave an answer