Title: Text change
Last modified: August 30, 2016

---

# Text change

 *  Resolved [AM77](https://wordpress.org/support/users/andy277/)
 * (@andy277)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/text-change-4/)
 * When you click the follow button, it changes to ‘Unfollow’ but I would like to
   change that text to ‘Following’, a small change simply because it sounds more
   positive.
 * I change some texts by using the gettext filter, example:
 *     ```
       function replace_text( $translated_text, $text, $domain ) {
               switch ( $translated_text ) {
   
       	   case '%s posted a new activity comment' :
       		  $translated_text = __( '%s Commented', 'my-text-domain' );
       		   break;
               }
   
       	return $translated_text;
       }
       add_filter( 'gettext', 'replace_text', 20, 3 );
       ```
   
 * But this filter doesn’t work for this Follow plugin. Any ideas how I can filter
   this?
 * Here is the line with the ‘Unfollow’ text in template.php:
    `$link_text = sprintf(
   _x( 'Unfollow', 'Button', 'bp-follow' ), apply_filters( 'bp_follow_leader_name',
   bp_get_user_firstname( $leader_fullname ), $r['leader_id'] ) );`
 * Thanks in advance.
 * [https://wordpress.org/plugins/buddypress-followers/](https://wordpress.org/plugins/buddypress-followers/)

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

 *  Plugin Author [r-a-y](https://wordpress.org/support/users/r-a-y/)
 * (@r-a-y)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/text-change-4/#post-6800954)
 * Hi,
 * Sorry for the late reply.
 * The `_x()` function does not use the `'gettext'` filter.
 * You need to use the `'gettext_with_context'` filter instead.
 *  Thread Starter [AM77](https://wordpress.org/support/users/andy277/)
 * (@andy277)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/text-change-4/#post-6800977)
 * No problem. That gettext_with_context worked. Thanks for your help.

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

The topic ‘Text change’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [AM77](https://wordpress.org/support/users/andy277/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/text-change-4/#post-6800977)
 * Status: resolved