This topic has 5 replies, 2 voices, and was last updated 10 years by Abe.

  • Author
  • #11324
     wttribe
    Participant

    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.

    #11492
     Abe
    Keymaster

    Hi, 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.

    #12816
     wttribe
    Participant

    Hi 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)

    #12964
     Abe
    Keymaster

    Hi, 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.

    #12987
     wttribe
    Participant

    Yeah. It definitely worked! thanks for your patience. I hope this trick can be useful to other users 🙂

    Great support. Great theme!

    Thaks

    #13085
     Abe
    Keymaster

    Great. 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.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Edit Profile Link’ is closed to new replies.

Log in with your credentials

Forgot your details?