Support » Plugin: Twitter » Can you embed Follow Button in the widget itself?

  • Resolved silent88uk

    (@silent88uk)


    hi there..

    Looked around but wasn’t able to figure out if what I’m after is at all possible?
    (I see that there was a similar thread judging by its title but not sure of this is the same issue)
    https://wordpress.org/support/topic/followbutton-not-showing-in-widget/

    My question is this: is it possible to place the little blue Follow Me button right in the widget itself where you see that blue Embed hyperlink, so that the button is shown instead of the blue text “Embed”?

    See attached screenshot

    These are 2 separate widgets: Twitter Profile and Twitter Follow Button, both from Twitter plug-in. Is there a way of “merging” them into one as described above? Do you need to add a piece of code to some .php files?

    Thanks a lot!

    • This topic was modified 2 years, 5 months ago by  silent88uk.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Niall Kennedy

    (@niallkennedy)

    The embedded profile timeline and the follow button are two different widget areas. If you would like to always append a follow button at the end of an embedded profile timeline widget then the after_widget parameter should be a good place to add follow button HTML.

    You can call do_shortcode on a twitter_follow shortcode to return the HTML to prepend in the after_widget argument.

    • This reply was modified 2 years, 5 months ago by  Niall Kennedy.

    Hi Niall,

    Thanks a lot for your reply – much appreciated.

    Yes, I realise that these are 2 widget areas – I was just wondering if there was a way of actually displaying the follow button so that it replaces the “embed” as shown in the mock-up below?

    It’s both for aesthetic and practical reasons, i.e. blog readers don’t really benefit from the “embed” hyperlink and the code made available to them, we wanted to turn into a follow button instead

    Perhaps there is a way to tweaking the underlying code in order to do that?
    If not, then I guess we’ll just have use both widgets, Profile Timeline and Follow Buttons.

    thanks in advance for your reply

    • This reply was modified 2 years, 5 months ago by  silent88uk.
    Plugin Author Niall Kennedy

    (@niallkennedy)

    You can drop the footer from the embedded profile timeline widget by selecting “no footer” in the widget configurator or setting a chrome shortcode attribute of nofooter. You could then choose to prepend follow button HTML through the after_widget widget argument described in my earlier comment.

    The Twitter plugin for WordPress includes Twitter’s official embedded timelines. The embedded profile timeline footer you mocked (follow, view on Twitter) is not supported in Twitter’s embedded profile timeline. You can create something similar by including both widgets close to each other.

    Hi Niall,

    Perfect. It (i.e. “no footer” + after_widget) does sound like an option we should consider. Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can you embed Follow Button in the widget itself?’ is closed to new replies.