I'm trying to hide the counter that's next to the follow button in my style sheet, but none of the code I've used will work. Using:
.btn-o, .count-o, .btn, .btn .label, #count {display:none;visibility:hidden;}
I'm trying to hide the counter that's next to the follow button in my style sheet, but none of the code I've used will work. Using:
.btn-o, .count-o, .btn, .btn .label, #count {display:none;visibility:hidden;}
That count is actually in an iframe showing from Twitter's site, so you don't have much control over it using CSS. However, there *is* a way to hide it. 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.
Worked like a charm. Thanks so much, Aaron!
Thanks so much! mr. aoron
You must log in to post.