-
Author
-
February 23, 2014 at 19:36 #11324wttribeParticipant
Hello I wanted to add a button called EDIT PROFILE next to the profile picture when one is viewing his own profile page and is logged in (so instead of seeing ADD AS FRIEND or SEND MESSAGE he would see the EDIT PROFILE button)
So this is what I did:
< ?php if (bp_is_my_profile()) { ?>
< div class=”generic-button” id=”send-private-message”>
< a class=”send-message” href=”profile/edit/group/1/#item-nav”>< ?php _e(‘Edit Profile’, ‘kleo_framework’);?>< /a>< /div>
< ?php } ?>The problem is that it works only when I am in the root of the profile page
Ex: mysite.com/members/my-name/But if I go to any of the tabs of buddypress (messages, activity, settings, groups, forum..) that link brings me in the forum groups…
What is the best php code to put to have it always linked to the EDIT PROFILE page?
thank you.
February 26, 2014 at 23:02 #11492AbeKeymasterHi, instead of
href=”profile/edit/group/1/#item-nav”
try
href=”<?php echo bp_loggedin_user_domain();?>/profile/edit/group/1/#item-nav”
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 16, 2014 at 19:12 #12816wttribeParticipantHi Abe, thanks for your help; did not work actually. Here is what I get:
The link created is this:
http://www.startempo.com/trova-competenze/admin/%E2%80%9Dhttp://www.startempo.com/trova-competenze/admin//profile/edit/group/1/#item-nav”any idea and this is what I wrote:
< a class=”send-message” href=”< ?php echo bp_loggedin_user_domain();?>/profile/edit/group/1/#item-nav”>< ?php _e(‘Edit Profile1’, ‘kleo_framework’);?>< /a>(I put spaces here not to have the code seen as html for this comment)
March 19, 2014 at 01:06 #12964AbeKeymasterHi, I don’t see any problem in my posted link. try re-writing from the keyboard the double quotes
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 19, 2014 at 10:59 #12987wttribeParticipantYeah. It definitely worked! thanks for your patience. I hope this trick can be useful to other users 🙂
Great support. Great theme!
Thaks
March 20, 2014 at 20:09 #13085AbeKeymasterGreat. Glad we could help.
Topic closed
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The topic ‘Edit Profile Link’ is closed to new replies.