BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › "add friend" first choice by default on cover photo
Tagged: cover photo button
- This topic has 12 replies, 6 contibutors, and was last updated 8 years, 9 months ago by Anonymous.
Question
July 23, 2015 at 10:38 am #43190@ggoagawhen I am login and go to memebers, I click on one member that is not friend with me and on his profile on his cover photo on the right is a drop down button with 3 choices:
-private message-add friend
-public message
Can I change the order? I want “add friend” first choice by default. (see attachment so you see what I mean)
Thanks a lot
Answers
July 24, 2015 at 7:43 am #43222@
AnonymousHi @ggoaga , i have attached screenshot from your website after code edit, you can view first option is add friend.
Regards
Varun DubeySeptember 30, 2015 at 10:40 am #47560@memacleI am trying to achieve the same thing on my webpage, but I cannot clearly understand what the solution is from the answer. Could anyone explain to me, how I can change the order to “add friend” displaying as first too?
September 30, 2015 at 11:41 am #47572@
AnonymousHi @memacle
buddypress/members/single
inside member-header.php
you can keep modified files inside the child theme at same path
replace following codeif($showing == "follows") { bp_follow_add_follow_button(); }elseif($showing == "friends") { if(!bp_is_friend(bp_displayed_user_id())) { bp_add_friend_button(); } elseif(bp_is_active( 'messages' )) { bp_send_private_message_button(); } else { bp_send_public_message_button(); } }else { if ( bp_is_active('activity') ) { bp_send_public_message_button(); } }
with
bp_add_friend_button();
Regards
October 6, 2015 at 4:38 am #48027@namronsThis code works to replace the “Follow” Button on the cover photo but it does not replace “Add Friend” in the drop down menu beside the button with the “Follow” Button.
October 8, 2015 at 12:48 am #48156@
AnonymousHi @namrons, We are not modifying default buddypress action, inside drop down you will get all actions added by BuddyPress and other BuddyPress supportive plugins.
Add Button section added extra before the action call, you can use that button as per our choice or your choice with conditional logic.
Regards
Varun DubeyFebruary 4, 2016 at 3:54 pm #58147@aaronmcnanyVarun,
I’m sorry, but I’m still very confused about the instructions here. I would like to make ‘Add Friend’ as the default button, rather than ‘Private Message’. Can you be more specific about what I need to do?
I’m not sure what this means:buddypress/members/single
inside member-header.php
you can keep modified files inside the child theme at same path
replace following codeWhere in the Child theme do I drop that .php file? I can only find that filepath in the Boss. theme, not the Child theme.
Thanks!
February 4, 2016 at 4:03 pm #58149@aaronmcnanyAlso, when I replace the above code with your given code: bp_add_friend_button();
It entirely removes the option to send a private message to members who you ARE friends with. I don’t want to remove any buttons, I just want ‘add friend’ to be the main display.February 5, 2016 at 10:52 am #58226@
AnonymousHi @aaronmcnany, Please copy the folder buddypress and paste it inside child theme and do the required changes in member-header.php
Regards
February 12, 2016 at 10:36 am #59014@aaronmcnany@pallavi, thanks for getting back to me last week.
I’ve run into an issue where my ‘Private Message’ function has disappeared. I need to keep ‘Add Friend’ as the primary button (for obvious reasons, since it’s a social network!), but I still really need to have the ‘private message’ function available to users. Can you help me out?
February 15, 2016 at 6:27 am #59271@
AnonymousHi @aaronmcnany, Plesae let me know where and how you have changed the code so I can guide you to get the codes back to work again.
Regards
February 15, 2016 at 8:24 am #59296@aaronmcnanyIf you read reply #47572 above, I did exactly what he told me to do: I removed the
if($showing == “follows”) {
}…..(abbreviated for saving space)function and replaced it with
bp_add_friend_button();
This obviously solved my problem of the ‘add friend’ button being hidden in the drop-down list, but it effectively removed the private message button.
What do you think I should do? Can I just addbp_send_private_message_button();
somewhere? Thanks!
(recommend to make ‘add friend’ button the default main button in future versions)
February 16, 2016 at 12:59 pm #59410@
AnonymousHi @aaronmcnany, Its working fine with us..Please send a description and admin credentials from our contact us page.. Thanks!
- The question ‘"add friend" first choice by default on cover photo’ is closed to new replies.