Change the Follow Me Button Text in BuddyPress

This snippet allows you to customize the ‘Follow Me’ link text. You can even embed a ‘follow me’ image instead of the text, by replacing the text Follow Me with an image, like this: $button_args['link_text'] = '<img src="path/to/image.png" />';

In the snippet, you can also find a list of arguments used for this function.

function custom_follow_button_args( $button_args, $leader_id, $follower_id ) {
	$button_args['link_text'] = 'FOLLOW ME....';
	return $button_args;
add_filter( 'bp_follow_get_add_follow_button', 'custom_follow_button_args', 10, 3 );
	 $leader_id : The user ID of the person we want to follow. - bp_displayed_user_id(); 
	 $follower_id : The user ID initiating the follow request. - bp_loggedin_user_id();
	 $link_text : The anchor text for the link.
	 $link_title : The title attribute for the link.
	 $wrapper_class : CSS class for the wrapper container.
	 $link_class : CSS class for the link.
	 $wrapper : The element for the wrapper container. Defaults to 'div'.

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!