BuddyDev

Search

[Resolved] Profile Button Order

  • Participant
    Level: Enlightened
    Posts: 21
    Axel on #24071

    WP Twenty Ninteen V:1.4
    BP 4.3.0 Nouveau

    Hi, by default the Add Friend button is first in line followed by Send Public Message then Send Private Message buttons. I would like to move the Add Friend button position so it displays third in line after the message buttons. I have tried the solutions offered around the internet with no luck. Thank you for any help.

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #24094

    Hi Axel,
    Please put this in your bp-custom.php or your theme’s functions.php

    
    
    /**
     * Move friendship button to the end.
     */
    add_action( 'bp_nouveau_return_members_buttons', function ( &$buttons ) {
    
    	$button = isset( $buttons['member_friendship'] ) ? $buttons['member_friendship'] : '';
    	if ( empty( $button ) ) {
    		return $buttons;
    	}
    
    	unset( $buttons['member_friendship'] );
    	$buttons['member_friendship'] = $button;
    
    } );
    

    That should do it.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 21
    Axel on #24096

    Yep, that did it. Thank you Brajesh! 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #24098

    You are welcome 🙂

The topic ‘ [Resolved] Profile Button Order’ is closed to new replies.

This topic is: resolved