New twitter plugin – to show tweets in rotation

As tweeted yesterday, I’ve just completed a new WordPress plug-in to show rotating tweets.

It’s easy to add using a widget or a shortcode in a post or on a page such as:

[rotatingtweets screen_name="mpntod"]

and, as a result, you get:

Surprising fact of the day: Hampshire/IoW is in the top third of regions by size across Europe by GDP... en.wikipedia.org/wiki/List_of…

About 10 hours ago from Martin Tod's Twitter via Twitter Web Client

For a bit more fun, you can add some extra options such as:

[rotatingtweets screen_name="mpntod" rotation_type='toss']

Surprising fact of the day: Hampshire/IoW is in the top third of regions by size across Europe by GDP... en.wikipedia.org/wiki/List_of…

About 10 hours ago from Martin Tod's Twitter via Twitter Web Client · reply · retweet · favourite

And the latest version goes for the official look:

[rotatingtweets screen_name="mpntod" official_format='1']

Surprising fact of the day: Hampshire/IoW is in the top third of regions by size across Europe by GDP... en.wikipedia.org/wiki/List_of…

[rotatingtweets screen_name="mpntod" official_format='2']
Martin Tod

Surprising fact of the day: Hampshire/IoW is in the top third of regions by size across Europe by GDP... en.wikipedia.org/wiki/List_of…

You can also search:

[rotatingtweets search='#secretcourts']

@ioerror #SecretCourts and #SecretLaw in our very own US of A. God save us all...

About 4 days ago from new shtwit's Twitter via Twitter Web Client

You can see the widget in action on the top-right of this page.

You can download the plug-in from here.

All this was only possible due to the good people of WordPress, the Twitter API, jQuery and jQuery Cycle – and Syd who showed me jQuery Cycle in the first place  – so a big thank you to them too! :-)

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
This entry was posted in Technology, Twitter, Wordpress. Bookmark the permalink.

453 Responses to New twitter plugin – to show tweets in rotation

  1. Valerie Lane says:

    New error in twitter feed:
    Twitter error code: 68 – The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.

    Please check the Twitter name in the widget or shortcode, Rotating Tweets settings or the Twitter API status.

    In debug mode this error appears above the widget: /rotatingtweets.php on line 944

    Also very interesting, it appears that my Oauth settings are not being saved. After I input them and click save, this page pops up:
    http://coaching.valiantlane.com/wp-admin/options.php. This has happened before, I think it was after the last dev version, and I didn’t realize that the settings weren’t being saved.

    After changing line 85, many errors in same file at line 33, which is:
    if($_GET[‘page’] == $this->pageinfo[‘filename’])

    Pages are in debug mode, see at: http://coaching.valiantlane.com/test-rotating-tweets

    • Martin says:

      First (easy) fix, try changing line 33 to:

      if(isset($_GET['page']) && $_GET['page'] == $this->pageinfo['filename'])

      Definitely a problem that the settings aren’t being saved – because we won’t be able to test anything until they are. I’ll see if I can replicate the problem.

      Martin

  2. Valerie Lane says:

    Changed ln 33. Back to square one: http://coaching.valiantlane.com/test-rotating-tweets. I changed that line back to original, page still crashed.

    Need site up so made pdfs of errors on tweets page:

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/Test-Rotating-Tweets-_-coaching.valiantlane.com_1.pdf

    and the settngs page for what happens after clicking save:

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/RotatingTweets_errors_save.pdf

  3. Valerie Lane says:

    Hi Martin,

    Removed and reinstalled the latest dev version and got formatting back. Still can’t save the settings.

    Thanks for your patience!

    Valerie

    • Martin says:

      I’ve updated the dev version so that if you get a crash that stops you updating the settings, it switches off the error checking for 24 hours to enable you to update the settings without crashing the page!

      This enables people who have a problem with wp_remote_request() to input working settings.

  4. Valerie Lane says:

    No change switching SSL to no.

    Plugins (all are activated):
    Akismet
    All in one Favicon
    All In One SEO Pack
    Custom Post Templates
    IQ Testimonials
    SI CAPTCHA Anti-Spam
    Simple Page Sidebars
    Social Media Widget
    WP-Table Reloaded

    With RT in widget and all PIs on, formatting crashes, RI and other widgets in same sidebar disappear. While leaving RT on and in sidebar widget, deactivated each PI to see impact and the only one that made a diff was Simple Page Sidebars. The formatting still crashed, the two widgets in the sidebar above RT appeared but the one below it didn’t, and RT still did not display. Interestingly, when I turned SPS back on, the two top widgets still displayed, which wasn’t the initial case when all widgets disappeared.

    Here is the page source code for SPS off and on with debug off.

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/pagesource_RTwidget_SimSideoff.pdf

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/pagesource_RTwidget_SimSideon.pdf

    Here is the page source code for SPS off and on with debug on.

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/pagesource_RTwidget_SimSideoff_debugon.pdf

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/pagesource_RTwidget_SimSideon_debugon.pdf

    Good luck & thanks for hanging in there!

  5. Valerie Lane says:

    The page source codes above were for when there was no unique sidebar per page and the only sidebar with widgets was “displayed everywhere.”

    There are 2 options for unique sidebars per page, one with the Simple Sidebars PI and through the Avisio theme. Here are the source codes with debugging on for when there is a unique sidebar:

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/pagesource_RTwidget_SimSideon_UniqueSidebar_debugon.pdf

    http://coaching.valiantlane.com/wp-content/uploads/2013/09/pagesource_RTwidget_AvisioTheme_UniqueSidebar_debugon.pdf

  6. Brent says:

    Dear Martin,
    Thanks for creating the plugin. Have used it before but now I was asked for the following:
    I would like to use your plugin with more than just one screenname. So i can have a team of the company sending tweets and show them on the site. Besides that I would like to add some shortcodes withit. So shortcodes and screennames in one rotating area. Is that possible? If so can you show me the shortcode or lines I have to alter ?

    thanks, Brent

  7. Valerie Lane says:

    Yep, still crashes with 1669 activated. Reloaded the dev version of RT, so wasn’t using the wp-twitteroauth.php you posted here yesterday. Will reinstall the original RT and check it out with Core Control.

    • Martin says:

      No burning need to have the latest release instead of the dev release.

      Only option I can see is seeing if Core Control can give us a working transport that doesn’t crash WordPress! I will be very interested if you can let me know the results of testing each of the transports.

      Best wishes,

      Martin

  8. esterb says:

    Hi, thanks for the great plugin.
    One question: how do I get only some of my tweets visible and not my whole account.
    I now have [rotatingtweets screen_name='esterb11' search='#Heyku' tweet_count='5' timeout='3000'], but that will also rotate tweets from others with #Heyku. I only want the #Heyku on my timeline.

    Can you help me?
    Best regards,
    esterb

  9. capt.PR says:

    Hi. How can i change shortcode for disappear screen name, time and date?

  10. Average Joe says:

    Hello Martin,
    I have tried this on 1 site and it worked fine. Then I tried it on another fresh install and the tweets won’t rotate. I read all of your FAQ on it and nothing there helped. I uninstalled it and then thought I cleared everything and re-installed it and my widget was still in place with all of it’s data. SO when you delete you plugin, it doesn’t remove everything so you can do a clean install. So I need to know what else there is to try. I have disabled all of my plugins. The theme I am using is Pressimo By MagPress.

    Any help would be appreciated! :)

    Thanks!

    • Martin says:

      Have you tried version 2 of the script as per the Rotating Tweets settings page?

      I’ve tried it with a clean install of the latest version of Pressimo and it seems to rotate for me – although it has big problems with widget width using version 1 of the script.

      Good question re: widgets. RT doesn’t remove them. I’ve had a look at the latest version of the API and it doesn’t seem to let you do this.

      Martin

      • Average Joe says:

        Yes I tried Version 2 and it breaks the widget. I’ll strip it all down and see if I can find the culprit. As of now Console doesn’t show me any errors. Nothing in the log files either. Has me stumped!

        • Martin says:

          Very odd not to see anything at all in the Console Log. Sometimes it can be a reference to something completely different that highlights the problem (i.e. something else is crashing Javascript).

          You might get some extra diagnostics if you switch WP_DEBUG to true in the wp-config.php file – but probably not (and this normally finds a load of other bugs).

          What this can sometimes be is a ‘hidden’ copy of jQuery or, possibly, jQuery.cycle. It’s there as a second copy overwriting everything that came before – but not with an obviously identifiable filename.

          If you send me a link, I can take a look if that helps.

          Martin

  11. Hi Martin,

    How do you change the colour of the links from the dark blue. I am using your plugin on a dark site and it doesn’t stand out?

    I have attached my URL so you can see.

    Thanks in advance.

  12. Andru says:

    Hi Martin,

    Great plugin, was wondering if there was any way of adding in buttons to control the rotation of the widget? Meaning users could manually cycle through the tweets if they wanted to?

    Also, is there anywhere you have listed all variables for the shortcode implementation of the widget?

    Thanks in advance!

  13. eddie says:

    i have followed instructions thoroughly and still no twitter feed. i need help to the highest degree. i have downloaded the latest upgrade.

    • Martin says:

      If you have:

      • Installed and activated the Rotating Tweets plug-in
      • Entered the Twitter settings on the Rotating Tweets settings page as per the instructions – and not seen any error messages at the top of the page
      • Installed a widget or added a short code to a page or post

      you should be seeing something on your page.

      if you’re not, can you send me a link or details of the template you are using?

      Martin

  14. tone says:

    on my website http://raisingbran.com I have your widget plugin on my sidebar however the color font is white and cant be seen with my white background how do I change the color of the widget font?

    • Martin says:

      It’s hard to check because the widget isn’t currently on your blog, but a way of doing it for Rotating Tweets would be something like:

      div.rotatingtweets {
          color: black;
      }

      but you may need a more global solution such as:

      aside.widget {
          color: black;
      }
  15. Jim says:

    Hi and thanks for the great plug in. I have only one issue. I would like to be able to increase the size of the title text, maybe center it or have the twitter bird before the title. You can view my website as my email adress. Where and what do I need to change.
    Thanks,

    • Martin says:

      You can do all of this via CSS. For example, you can change the size of the name and centre it via:

      div.rtw_name {
         font-size: 1.2em;
         text-align: center;
      }

      and the tag via:

      div.rtw_id {
         font-size: 1.1em;
      }
  16. Jay says:

    Should this plugin auto-refresh? It’s not happening on our tise.

    • Martin says:

      Do you mean auto-refreshing after the page is loaded?

      No. Currently the plugin doesn’t do this.

      Because there are quite tight restrictions on how often a site can get data from Twitter, it would be quite tricky to implement.

  17. James says:

    Hi,

    Is there any way I can adjust the distance between the widget header and the tweet?

    Thanks

  18. Pingback: Antivirus Software Blog » Rotating Tweets (widget and shortcode) 1.6.4

  19. christian says:

    Hi, on my website http://www.hopelefeber.com/ rotating tweets in sidebar does not showing newest tweets. I tried to clear cache but still no luck. please advice for this issue thank you

  20. Jyron says:

    Hi Martin.

    I love this plugin!! For some reason the tweets won’t rotate anymore. I disabled all the plugins to see if that caused the problem, but no luck. Any advice you can give me is greatly appreciated. The plugin is on several pages. Thanks

    http://keysignatureonline.com
    http://keysignatureonline.com/bbnb_artists/aerial-view/

    • Martin says:

      For some reason, the JavaScript isn’t appearing on the page anywhere.

      I don’t know if it is another plug-in causing this or if `wp_footer()` or `wp_header()` is missing from your template.

      What happens if you change the JavaScript settings on the Rotating Tweets settings page?

      Have you tried loading the site with WP_DEBUG set to true in wp-config.php ?

      Martin

  21. Jyron Baxter says:

    Thanks for the quick response Martin! I ended up using a hack and hardcoding the references to the js files in header.php. It worked for the artist pages but the home page does not show any tweets. It appears that the javascript is working on this page as well. Any ideas??

  22. Matt says:

    Hi Martin!

    Thanks for this great plugin, I really appreciate it! I’m using it on my current website which will go up officially at some point. You can find my website under
    http://69.89.31.80/~climatk6/climatesnack/

    I do have this white space in between the Follow button and my menu bar… do you know how to get rid of it? I didn’t have this problem with the other Twitter ticker I used previously.

    Thanks,
    Matt

    • Martin says:

      Somewhere in your stylesheet, you’ve got:

      .widget {
          margin-bottom: 30px;
      }

      So, you need to have something like:

      .widget.widget_rotatingtweets_widget {
          margin-bottom: 5px;
      }

      in your CSS.

  23. Hi Martin,
    I really enjoy the plugin. I have a problem however. I use the plugin in a post, but the space where the tweets are supposed to be have somehow shrinked to something like half a line, and I can’t figure out why. In that way I cannot see the tweets… Can you help me on this?

  24. Hi Tod,

    I am using your rotating tweets plugin on the homepage of my website. Its a great plugin but I dont understand why it is showing your tweets instead of mine. I have created API using my own twitter account. It is working perfectly on the sidebar widget but only the problem is on the home page.

    Any help would be really appreciated. Keep up the good work!

    Regards
    Talha

  25. Aaren says:

    Hi Martin,

    First of all great plugin! I am using wordpress canvas and have a couple of issues. Using rotating tweets 1.6.7.

    1. What CSS do i need to resize the fonts? Does this need to be updated in the script??

    2. I have added the ” official_format=’1′ ” to improve the feed, but this is not showing up in the twitter feed..

    [rotatingtweets screen_name="ss_living" official_format='1']

    Cheers

    Aaren

    • Aaren says:

      Ok, so i solved 1. with the follow code i found from another thread;

      still have not solved 2.

      p.s. this information on modifying the properties would be really useful with the app details for users who may be new to this, such as myself. But good work on all the feedback on your page!

      • Aaren says:

        Apologies – here is the code i found!

        div.widget_rotatingtweets_widget, div.rotatingtweet, div.widget_rotatingtweets_widget div.widget-title {
        max-width: 240px; font-size: 10px;}

    • Martin says:

      Aaren,

      I’m surprised that your shortcode isn’t working. I copied it exactly onto my site and it did!

      What result were you expecting from official_format=’1′ ? What happens if you try official_format=’2′ ? Can you send me a link?

      Martin

  26. ale says:

    Hi Martin, I upgraded your plugin from 1.4.7 to 1.6.7. WordPress 3.5.1

    I got this error:
    Problem retrieving data from Twitter.
    Wordpress error code: http_request_failed – SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    Please check your PHP and server settings.

    Can you help me? Where I wrong? Thank you.
    ale

    • Martin says:

      What happens if you switch off SSL on the settings page?

      Martin

      • ale says:

        Nothing.
        In the same page I have the rotating tweets in the sidebar as widget and in the page like shortcode.

        In the sidebar widget I got only one tweet old 2 months, in the page i got the error: Problem retrieving data from Twitter. WordPress error code: 999 – Failed to read valid data from Twitter: problem with wp_remote_request()

        In the screen_name property, I have to write the twitter nick or the name of the twitter app I create here dev.twitter.com? I wrote the twitter nickname.

        • Martin says:

          This is a tricky one. I’m not quite sure what WordPress is getting back from Twitter.

          The latest development version has some code to identify what the problem might be – if you set WP_DEBUG to true in wp-config.php it will provide a lot of useful information in the HTML.

  27. Jan de Boer says:

    Hi Martin,
    Thanks for your great plug-in that works fine on WP 3.8.1.
    Is is possible to set the amount of time (in seconds) each tweet (i.e. the rotating time) is displayed in the shortcode?
    Best wishes,
    Jan

  28. Javi Cueto says:

    Thanks for the pluging
    I have problems with rotation. It doesn’t work!
    I don’t know why.

    Please help!!

    • Javi Cueto says:

      [rotatingtweets screen_name='A_Toda_Vela' include_rts='1' tweet_count='3' timeout='7000' show_follow ='1' official_format='2']

    • Martin says:

      Normally this is a JavaScript problem. Either the Rotating Tweets JavaScript isn’t displayed – or it clashes with another plug-in’s scripts.

      Have you tried both versions of the script on the settings page? Looking at your page, I think your best bet will be to use version 2 of the script.

  29. Pingback: Rotating Tweets (Twitter widget and shortcode) | WP Plugin Directory

  30. John Ellis says:

    Hello. Rotating Twitter is a brilliant plug in. Well done! I am using it on my own site and would love to use it on a site I am tweeking for an educational organisation in London. The only problem is: I would like it to display only the last 10 tweets on the timeline or last 10 tweets from users on a list. I don’t want the display to clog up with old tweets. Can I tweek the code to do that? What would I need to put in and where? Are you going to be creating any more great plug-ins? All the best. John Ellis

  31. Valerie Lane says:

    Hi Martin!

    You may remember that last year my site was crashing with RT. Wanted to let you know that the latest version of RT works beautifully in my new WordPress template! You can see it at

    http://coaching.valiantlane.com/about/our-founder

    I do have a question. I want to change the text color of the tweets and tried to do it in style.css in the three lines of code for color. The color didn’t change. Any ideas of how to resolve that?

    Very happy to have RT on my site! Thanks so much!

    Valerie

    • Martin says:

      Hi Valerie,

      Great to hear it’s working properly now!

      What happens if you add something like:

      div.rotatingtweet p,
      div.rotatingtweet p.rtw_main a,
      div.rotatingtweet p.rtw_meta a {
          color: blue;
      }

      to your rotatingtweets.css file?

  32. Morten says:

    Hello

    It seems that there is something awry with character encoding, specifically æøå that is replaced with question marks etc. Any idea why? Often, this happens if the php-file isn’t encoded as UTF-8, but this does not seem to be the case at hand here.

  33. Chris says:

    Hello Martin,

    My Website: http://djdims.fr/

    1. How can I limit the number of characters?
    2. How do I enable manual rotation of tweets?
    3. How to make a link to the complete block tweet in question?

    Thank you very much!
    soon

    • Martin says:

      Via a shortcode, and using the development version of the plug-in, it will be something like:

      [rotatingtweets screen_name="iAmDJDims" show_meta_prev_next="1" link_all_text="1" tweet_length="50"]

      (although link all text links to the user page, not the tweet).

      • Chris says:

        Hi,

        Thank you verry much for your answer.

        But,

        tweet_lenght

        doesn’t work….

        And there are a space between prev / next block (http://djdims.fr/Sans-titre-2.jpg)

        I do not know where it comes from !

        Thx u again !

        • Martin says:

          The space in between is the `middot` variable.

          `tweet_length` worked when I tried it. Have you installed the latest development version? Which `tweet_length` did you set? Could you post your short-code here?

          • Chris says:

            Hi,

            Thank you very much, I understand the system.

            But I do not want the space that generates the variable ‘middot’ how do I do?

            Shortcode :

            [rotatingtweets screen_name="iAmDjDims" show_meta_timestamp="0" show_meta_prev_next="1" show_meta_screen_name="0" link_all_text="1" middot="0" show_meta_via="0" tweet_length="40"]
          • Martin says:

            Try the latest development version of the plugin and:

            [rotatingtweets screen_name="iAmDjDims" show_meta_timestamp="0" show_meta_prev_next="1" show_meta_screen_name="0" link_all_text="1" middot="" show_meta_via="0" tweet_length="40"]
  34. Marjan Crabtree says:

    I love the plugin.
    Would it be possible to add formatting options?
    I would like a black thin border around it so it looks the same as my facebook widget.

  35. Chris says:

    Thank you, this is perfect.

    But when I change the file ‘language’, nothing happens?

    I would change the French file, but when I replace “before” with “^”, nothing happens …

    Incidentally, the correct translation is: “Précédent” in French.

    Thx

    • Martin says:

      You normally need two files to edit the language. You edit the .po file in text. And then convert it to a .mo file for WordPress.

      The trick is to use a piece of software like poedit – this also converts the .po file to a .mo file that WordPress can use.

      Please send me an up to date .po file and I’ll update the standard file. :-)

  36. Nick Hill says:

    Hi Martin,

    Thanks for really elegant plugin.

    I was wondering if I can remove the rounded box from around the Tweet window and if I can reduce the margins/padding from the Tweet content.

    I have embedded the plugin into another element which has its own styling and padding.

    Thanks,

    Nick

    • Martin says:

      Nick,

      The appearance of all the elements of the plug-in are completely editable via CSS. It’s hard to say more without seeing your particular site.

      Martin

      • Nick Hill says:

        Hi Martin,

        Thanks for the reply. I have moved on a bit from the last time I posted and wondered if you were able to help me achieve the following?

        The website is: tbcscurrent.wpengine.com

        This site is in development and I would like to set the ‘Rotating Tweets’ box to be the same as the others in that row. [These aren’t finished graphics merely place holders for now.] The site is responsive so I need ‘Rotating Tweets’ to follow the behaviour of the other graphics when the window resizes.

        I could also do with having square corners too, and the same padding/margin as the other graphics in the row.

        Hopefully that explanation is clear. Any help would be much appreciated!

        Regards,

        Nick

        • Martin says:

          My general way to sort this is to set the size of div.rotatingtweets, div.rotatingtweet and section.shortcode-action-box via CSS using max-width or width and/or max-height or height. I find right clicking (in Chrome) and inspect element – as well as the ability to edit CSS on the fly – very helpful in sorting this out!

          Hope this helps,

          Martin

  37. Gary says:

    Hi, thanks for a great plugin. I just wanted to know is it possible to display tweeted photos in the feed with this plugin?

    Thanks
    Gary

    • Martin says:

      Only if you’re using a shortcode and it’s pretty experimental at the moment. Try including `show_media=1` in the shortcode.

      Martin

  38. Dea Bell says:

    Hi Martin, thanks for your work on this plugin.
    My tweets are rotating and everything seems to be working fine except that it is not posting my most recent tweets.
    Any possible solution to this?

  39. Dea Bell says:

    Thanks for your work on the plugin Martin. Everything seems to be working fine except that my most recent tweets are not showing. Any suggestions?

  40. Toby says:

    Great, simple plugin!

    Any way I can display more than one tweet at a time? I already have it rotating through 10 tweets.

    I’m happy to edit the code if needed, just wondered if there was an easier way, ie with shortcode?

    • Martin says:

      Certainly. Make sure you are using version 2 of the JavaScript and then:

      [rotatingtweets rotation_type="carousel" screen_name='toby']

      should do it for you. Other options are here.

  41. Hi Martin, great plugin.

    Im having a small issue with one site – http://themusicwardrobe.co.uk/about-the-music-wardrobe/

    the tweets seem to be appearing but are partially hidden, any ideas?

    Im using – [rotatingtweets screen_name="_MusicWardrobe" official_format='2']

    Thanks

    • Martin says:

      Very odd. I’ve never seen that before.

      Two possible options:

      1. Try version 2 of the JavaScript
      2. Try some extra CSS in your stylesheet (or in an extra rotatingtweets.css stylesheet in wp-content/uploads) – something like:
        div.rotatingtweets {
           width: 605px;
           height: 150px;
        }
  42. Jon says:

    How can I place the follow button before/over the tweets rather than below as the default version does?
    Thanks for a great and flexible plugin.

    • Martin says:

      The fastest option would probably be to have a separate text widget which includes something like:

      <div class='follow-button'>
          <a href='http://twitter.com/mpntod' class='twitter-follow-button' data-show-screen-name="false" title='Follow @mpntod' data-lang='en'>
              Follow @mpntod
          </a>
      </div>

Get in Touch

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>