WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Twitter Widget Pro] Hide follower count

[Resolved] [Plugin: Twitter Widget Pro] Hide follower count

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m looking for a solution to the same problem, if anyone has an answer yet. Thanks!

    Plugin Author Aaron D. Campbell

    @aaroncampbell

    There’s no option for this, but there IS a filter in the code so that you can do this if you want. Add this code to the end of 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' );

    That will add a new data element to the follow link, which tells Twitter you don’t want to show your follow count.

    Thanks, Aaron. I had just figured out how to do this in the widget’s php file but your solution is much better!

    thanks

    Many thanks, Aaron, very useful!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: Twitter Widget Pro] Hide follower count’ is closed to new replies.