BuddyBoss Home – Web Support Forums Themes Boss. theme Cancel Friendship in PHP files

Viewing 12 posts - 1 through 12 (of 12 total)
  • Question

    #36891
    @msutyler2

    Where can i find the cancel friendship code. I can’t find it for the life of my. I would like to remove it from the header.

    Is there a way to use Firebug to identify what php files is being used?

    Answers

    #36892
    @msutyler2

    @style960 – Hey Paul, you seem to be a bit more active here. Do you have any insight on this?

    Thanks as always.

    #36913

    Alyssa
    Participant
    @alyssa-buddyboss

    @msutyler2 here is the file: members/single/members-header.php about line 121, specifically it is part of a BuddyPress action:
    do_action( 'bp_member_header_actions' );
    This code is within the above action:
    add_action( 'bp_member_header_actions', 'bp_add_friend_button' );
    You would need to add this under the php section just before/after that line:
    remove_action( 'bp_member_header_actions', 'bp_add_friend_button' );

    #36919
    @msutyler2

    I actually solved this using CSS. I used display: none to remove from the header and then made the cancel friendship button way less noticeable in the member directory

    #36954

    Alyssa
    Participant
    @alyssa-buddyboss

    OK, I’ll leave this open just in case you have additional issue.

    #36986
    @msutyler2

    Actually @tjchester, one of my users mentioned it was hard to find where to add friends on my site.

    Is there a way to run an if statement in CSS that says, if button reads “Add Friend” then display this CSS and if button reads “Cancel Friendship” then display this CSS?

    #37009

    Alyssa
    Participant
    @alyssa-buddyboss

    @msutyler2 You can try this, but this should probably be done via PHP but that would need to be a BuddyPress support question.

    .friendship-button.not_friends{}
    .friendship-button.is_friend{}
    #37012
    @msutyler2

    Like the support here in the forums? Or a customization request?

    #37061

    Alyssa
    Participant
    @alyssa-buddyboss
    #37102
    @msutyler2

    @tjchester – would something like this hide the massive “Cancel Friendship” button?

    .friendship-button.is_friend{
    display: none;
    }

    #37109
    @msutyler2

    got it. worked. thanks

    #37210

    Alyssa
    Participant
    @alyssa-buddyboss

    Great, I’ll close this out.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The question ‘Cancel Friendship in PHP files’ is closed to new replies.