WordPress.org

Forums

BuddyPress Follow
Add Friend button (5 posts)

  1. rafaelfragosom
    Member
    Posted 1 year ago #

    Hey,

    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:
    http://img594.imageshack.us/img594/5324/capturadetela20130426as.png

    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?

    http://wordpress.org/extend/plugins/buddypress-followers/

  2. r-a-y
    Member
    Plugin Author

    Posted 1 year 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' ) ) {
    		return;
    	}
    
    	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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  5. r-a-y
    Member
    Plugin Author

    Posted 1 year ago #

    Sounds related to this BuddyPress bug:
    http://buddypress.trac.wordpress.org/ticket/5147

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic