Title: customize follow button
Last modified: August 21, 2016

---

# customize follow button

 *  [Pepperbase](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years ago](https://wordpress.org/support/topic/customize-follow-button/)
 * Hi,
 * I am using your code to display the follow button:
 *     ```
       <?php
       if ( function_exists( 'bp_follow_add_follow_button' ) ) :
           if ( bp_loggedin_user_id() && bp_loggedin_user_id() != get_the_author_meta( 'ID' ) ) {
               bp_follow_add_follow_button( array(
                   'leader_id'   => get_the_author_meta( 'ID' ),
                   'follower_id' => bp_loggedin_user_id()
               ) );
           }
       endif;
       ?>
       ```
   
 * Is it possible to use the button arguments in this filter too?
 *     ```
       // setup the button arguments
       		$button = array(
       			'id'                => $id,
       			'component'         => 'follow',
       			'must_be_logged_in' => true,
       			'block_self'        => empty( $members_template->member ) ? true : false,
       			'wrapper_class'     => 'follow-button ' . $id,
       			'wrapper_id'        => 'follow-button-' . $leader_id,
       			'link_href'         => wp_nonce_url( $leader_domain . $bp->follow->followers->slug . '/' . $action .'/', $action . '_following' ),
       			'link_text'         => $link_text,
       			'link_title'        => $link_title,
       			'link_id'           => $class . '-' . $leader_id,
       			'link_class'        => $class
       		);
       ```
   
 * I would like to set the link_text myself and use the Twitter Bootstrap button
   classes. If it is possible. Could you give an example?
 * Thanks!
 * [http://wordpress.org/extend/plugins/buddypress-followers/](http://wordpress.org/extend/plugins/buddypress-followers/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [r-a-y](https://wordpress.org/support/users/r-a-y/)
 * (@r-a-y)
 * [13 years ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689168)
 * Good catch. The button template tag needs to be more flexible so you can set 
   those parameters when you manually add the button.
 * In the meantime, you could use the existing CSS class and ID to add those styles.
 *  Thread Starter [Pepperbase](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689213)
 * Great.
 * About the link_text in the follow button. Is there also a temporary solution 
   to remove the name of the user? I am displaying the follow button behind a user
   profile link (with username as text) and it doesn’t look nice to display the 
   username twice. It also takes to much space 🙂
 * I could use the localization file to remove the username, but that is site wide.
 * Thank you for the support.
 *  Plugin Author [r-a-y](https://wordpress.org/support/users/r-a-y/)
 * (@r-a-y)
 * [13 years ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689250)
 * You’ll have to use the localizaton file until I get to this.
 * Once that is done, you should be able to customize all aspects of the button.
 * Keep your eye on:
    [https://github.com/r-a-y/buddypress-followers/issues/10](https://github.com/r-a-y/buddypress-followers/issues/10)
 *  Plugin Author [r-a-y](https://wordpress.org/support/users/r-a-y/)
 * (@r-a-y)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689362)
 * Hi pepperbase,
 * Forgot to reply back to you, but I answered a similar question awhile ago:
    [https://wordpress.org/support/topic/using-an-image-instead-of-text-on-follow-buttons?replies=8#post-4349829](https://wordpress.org/support/topic/using-an-image-instead-of-text-on-follow-buttons?replies=8#post-4349829)
 * You can actually set the link text by using a code snippet similar to the one
   I provided in that thread:
    [http://pastebin.com/ST1C3NGk](http://pastebin.com/ST1C3NGk)
 * Hope that helps.
 *  Plugin Author [r-a-y](https://wordpress.org/support/users/r-a-y/)
 * (@r-a-y)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689363)
 * Actually, after re-reading the initial post, I didn’t really address the main
   issue of setting the other button parameters.
 * But, the post above gives you a workaround until I look into this.
 *  [jlooooo](https://wordpress.org/support/users/jlooooo/)
 * (@jlooooo)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689378)
 * Thanks I already used the localization file to change the text, but I will change
   it after an update with the above solution.
 * Would be nice to set the other parameters.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘customize follow button’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-followers_ffe5b1.svg)
 * [BuddyPress Follow](https://wordpress.org/plugins/buddypress-followers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddypress-followers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-followers/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-followers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-followers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-followers/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [jlooooo](https://wordpress.org/support/users/jlooooo/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/customize-follow-button/#post-3689378)
 * Status: not resolved