Twitter Widget Pro
[resolved] Hide "Follow [USERNAME]" and Followers on Widget? (2 posts)

  1. ChristinaHendriks
    Posted 3 years ago #

    Hello again,

    My client would like me to hide the '"Follow [USERNAME]" <-## Followers' button on the Twitter Widget Pro. They would like it to only show the little bird icon instead. Is this possible for me to code? Or does it involve modifying the widget as a whole?

    Any thoughts are welcome, thank you!


  2. Aaron D. Campbell
    Plugin Author

    Posted 3 years ago #

    You can't hide the word follow. You can hide the count and the username if you want. Here's info about what parameters the follow link can use: https://dev.twitter.com/docs/follow-button

    You can add some of those parameters by adding code like this to another plugin or to your theme's functions.php file:

    function range_hide_follower_count( $attributes ) {
    	if ( ! empty( $attributes['class'] ) && 'twitter-follow-button' == $attributes['class'] )
    		$attributes['data-show-count'] = 'false';
    	return $attributes;
    add_filter( 'widget_twitter_link_attributes', 'range_hide_follower_count' );

    You can add any of the attributes you find in that link

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitter Widget Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.