BuddyPress Follow
Add Friend button (5 posts)

  1. rafaelfragosom
    Posted 3 years ago #


    Sorry for the bad English, I live in Brazil.

    I need to change my layout a bit and the only missing is the organization of the buttons from the user profile. The plugins prints this buttons on my user profile:

    I want to take out the "Add friend" button and add it separately to another section of the profile page. How can I achieve that?


  2. r-a-y
    Plugin Author

    Posted 3 years ago #

    This is not related to the plugin, but I'll answer this.

    You need to add the following in your theme's functions.php or /plugins/bp-custom.php:

    // remove 'add friend' button from profile page
    function my_remove_friend_button() {
    	if ( ! function_exists( 'bp_displayed_user_id' ) ) {
    	if ( bp_displayed_user_id() && bp_is_active( 'friends' ) {
    		add_action( 'bp_member_header_actions',    'bp_add_friend_button', 5 );
    add_action( 'get_header', 'my_remove_friend_button' );

    Then use bp_add_friend_button() somewhere in your template file where you want the "Add Friend" button to show up.

  3. rafaelfragosom
    Posted 3 years ago #

    Thanks for your help!

    Now I'm facing another problem with the theme (or plugin). The buttons that I described are not showing on the profile anymore and the <?php do_action( 'bp_member_header_actions' ); ?> is there.

    What's happening?

  4. lex.mustafin
    Posted 2 years ago #

    Hey rafaelfragosom,
    I'm facing the same issue.
    Were u able to find a fix for disappearing buttons?

  5. r-a-y
    Plugin Author

    Posted 2 years ago #

    Sounds related to this BuddyPress bug:

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BuddyPress Follow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic