WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Widget Pro
[resolved] Display nuymber of followers (5 posts)

  1. jmbalsa
    Member
    Posted 1 year ago #

    hi there, I need to display the number of followers, is that possible? Can somebody give me the code?

    Thank

    http://wordpress.org/extend/plugins/twitter-widget-pro/

  2. Rootside
    Member
    Posted 1 year ago #

    It’s part of your follow button: in the widget settings, just check ‘Show Follow Link’.

  3. Aaron D. Campbell
    Member
    Plugin Author

    Posted 1 year ago #

    Rootside has it right.

  4. Lock-N-Load
    Member
    Posted 1 year ago #

    BUT, can you leave the Follow Link but remove the number of followers box? My clients user name is long, and with that button/link + the follower numbers, it actually is to wide and cuts off some of the follower numbers so we want to just remove that. I suspect there is some way, at the code level, to edit the plugin.

    anyone?

  5. Aaron D. Campbell
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, there has been code posted in several places on this forum to show how to do that. Here's a couple examples:
    http://wordpress.org/support/topic/hide-follow-username-and-followers-on-widget
    http://wordpress.org/support/topic/plugin-twitter-widget-pro-hide-counter

    Here's info about what parameters the follow link can use: https://dev.twitter.com/docs/follow-button

    You can adjust what parameters are passed 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' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.