• Resolved amichel86

    (@amichel86)


    Hi, here’s what I am trying to achieve:

    I want the “show follow link” button to be standard HTML that I can place anywhere. Right now it diplays a twitter styled button with the user count etc.

    I don’t see any options in the Widget itself. Is there a way to customize this button without changing the plugin files in case the client updates this plugin?

    Thanks!

    https://www.ads-software.com/extend/plugins/twitter-widget-pro/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Aaron D. Campbell

    (@aaroncampbell)

    You could remove the class “twitter-follow-button” which would make Twitter’s JavaScript not touch the button at all. To do that, use this code:

    function range_no_twitter_follow( $attributes ) {
    	if ( ! empty( $attributes['class'] ) && 'twitter-follow-button' == $attributes['class'] )
    		$attributes['class'] = '';
    
    	return $attributes;
    }
    add_filter( 'widget_twitter_link_attributes', 'range_no_twitter_follow' );

    There are plenty of other things you could do such as removing the count, etc (https://www.ads-software.com/support/topic/plugin-twitter-widget-pro-hide-follower-count) if you still want to keep the advantages of thw Twitter JS (which does things like style the button differently if you aleady follow the person, etc).

    More info on the Twitter Follow button: https://dev.twitter.com/docs/follow-button

    Thread Starter amichel86

    (@amichel86)

    Thank you very much, exactly what I was looking for! And another question if I want to display custom text in that link, what would I need to add?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Twitter Widget Pro] How to customize the "Show follow link" without modifying the’ is closed to new replies.