Question: How can we dynamically link to each user’s own profile from a custom menu item?
Hi FluentCommunity team 👋
We’re customizing the top-right user dropdown menu and would like to add an extra item labeled “My Profile”, which redirects each logged-in user to their own profile page, just like the default avatar menu does.
We’ve tried multiple dynamic paths, including:
/heplus/u/{{user_url}}/
/heplus/members/me
/heplus/u/me
#{{user_url}}/spaces
But none of them work—they either redirect to the homepage or throw an error like:
Error: No query results for model [FluentCommunity\App\Models\XProfile]
We simply want to replicate the same behavior of the native avatar/profile button, but as a custom entry in our dropdown menu.
❓Can you confirm:
-
What is the correct dynamic URL (if any) for a user to access their own profile?
-
Is there an available variable like {{user_url}}, {{user_slug}}, or {{current_user}} that can be used safely in menu links?
-
Or is there an internal shortcode/function we should use instead?
We want to avoid hardcoding usernames and ensure this works for all logged-in users.
Thanks in advance! 🙏
David
Human Excellence Plus™
#user_url works for me. From what I see in the code, the following should work too:
#{{user_url}}
Thomas Oates Thank you so much, Thomas!
Your reply was incredibly helpful. Using #user_url worked perfectly, and it solved exactly what we needed. I truly appreciate your time and support — you helped us move forward with a key part of our app. 🙏
Wishing you all the best!
Thomas Oates Thomas, do you have any idea about what url can I paste for the custom menu item "My Spaces" in the wordpress menu setting of my theme so that when any users click on "My Spaces" it would direct them to their list of spaces.
arjun arjun At the moment you cannot as this is outside of the plugin. It is apparently however coming in the next version. And so now I get curious about everything else that will make possible for us. It is hard to be patient. :)
I just tested and "/heplus/u" is it in your case. :)
Hi JV,
Thank you so much for confirming that – really appreciate you taking the time to test and share your findings! 😊
Your input adds great clarity to this process and helps us validate the path we’re taking with the integration.
Wishing you continued success and many thanks again for your support!
David Badilla Salazar Thank you for the push. I was thinking about something like this since users may not intuitively find their profile.