Support ThinkTwit

ThinkTwit is open source and developed for free – if you find ThinkTwit useful please help support its future development by making a donation.

PayPal — The safer, easier way to pay online.

ThinkTwit is a Twitter module for WordPress. ThinkTwit uses the Twitter JSON API v1.1 to display recent tweets from one or more Twitter users. It is very simple, yet flexible and easily customised. It can be placed on your WordPress page simply through drag and drop on the Widgets interface or through the use of Shortcode or a PHP function call.

ThinkTweet was created due to a lack of fully functional modules that offer the ability to request tweets from more than one user. It was created using a heavily modified version of code written by Anders Ross at Instant Shift with added code changes by Kevin Pajak at Thanks guys, the code has been much appreciated!

Given the code created was so useful, and the lack of modules that did what we required, it was decided to create a plugin so that we can give something back to the community – we sincerely hope that others can benefit from this!

ThinkTwit was originally developed by Stephen Pickett when he was working for Think Consulting Solutions. Think decided to open source the code and after he left Stephen decided to continue to maintain the code.


  • Can be configured from Widgets settings (if displayed in sidebar)
  • Can be implemented using shortcode or Output Anywhere (PHP function call)
  • Contains default slimline CSS (which can be turned off) for integrated look and feel
  • Easy to configure and customise (through settings and CSS)
  • Multiple instances can be deployed (like other widgets/plugins)
  • JavaScript is not required (unless no-caching is activated)
  • Can specify multiple usernames
  • Tweets can be filtered by #hashtag or keyword
  • Can specify maximum number of tweets
  • Can specify maximum number of days back to display
  • Supports no-caching, to prevent caching of tweets by caching engines such as WP Super Cache
  • Supports CURL as an alternative to access to the Twitter API if URL file-access is disabled
  • Can display the avatar of the Twitter user
  • Supports optional caching of tweets and avatars
  • Output can be filtered (using apply_filters)
  • Can optionally output “Follow @username” links


The following is a list of features (in order) that will be implemented in future releases (struck through items are completed and awaiting release):

  • Add AND/OR option to Twitter search for searching for all/some usernames, all/some hashtags plus searching for usernames AND hashtags
  • Add image support (if possible)
  • Add word filtering to prevent display of unsavoury content
  • Add refresh time “off” to keep tweets but prevent any further updates
  • Add method to select avatar image sizes
  • Add place holder image so in case the correct avatar can’t be found it can use this
  • Fix output of tweets for certain rare situations
  • Hashtag filtering should also filter cache
  • Add option to output published as text, timestamp or not at all
  • Allow configuration of avatar cache time
  • Modify code that loads tweets from cache so that if it is empty it can get Tweets from Twitter
  • Implement admin-ajax.php to use AJAX
  • Fix storing of update time in settings when making updates and using multiple widgets
  • A method of backing up old options (to allow roll back), adding new options when necessary and transforming options where they are changed during upgrades

ThinkTwit is hosted at WordPress Plugins.

72 thoughts on “ThinkTwit

  1. Hi Jeffrey,

    Yes of course I can help. If you are using a caching engine it should still get the images though they may not be up-to-date, however you could always try turning on “no caching”. If this doesn’t work please give me a link to your site and I will try to help you debug it.

  2. Stephen, a bit of an update:

    The images seem to show now, but now consistently. Perhaps it has something to do with the caching plugin, or perhaps the Twitter feed updates. Not exactly sure? If I check my blog right now, it’s working fine, if I check it again in 30 minutes, the images won’t be showing.

    Also – would it be possible to make the links in the tweets nofollow?

    Finally – I also want to increase the padding above the title of the sidebar widget. As it stands right now, the “Latest Tweets” title sits too close to the first tweet. Can you help there as well?

    If you want to email me, that would be great, or we can continue to exchange comments here until we reach a solution.

    Cheers and Many Thanks,

  3. Hi Jeffrey,

    Are you making many requests to Twitter? This may happen if you are not using caching (in ThinkTwit settings) and you have a lot of regular visitors. I have experienced this inconsistency as well on another site I run and feel that it is probably down to the number of requests, and so caching of meta data (names, images, Twitter feed URLs etc.) is on my list of to-do’s, but before that I’m working on code to improve upgrades.

    You can make links nofollow by using a filter, see:

    As for the padding above the title by setting the margin-top of the widget-title class in your css, e.g. thinktwit-3 h3.widget-title { margin-top: 20px }

    Happy to continue through exchanging comments in case anything we discuss is useful to others.

  4. Hey Steve.

    I’m trying to get ThinkTwit set up via the PHP Function Call, but i’m having no luck. Any advise would be helpful as to how to set that up.


  5. My tweets have stopped feeding to the website. Is it something I did or is it twitter? It is set to Live(cached), prevent cached is set to NO, use curl is set to YES, output debug is set to NO. If you need anymore info let me know.

  6. Hi Patrick,

    It’s quite possible that there was a problem with Twitter at the time but if you are using caching it should be ok. If your web server will allow you to use file_get_contents() then you shouldn’t need CURL and it could be that CURL is not allowed, so you might want to try setting Use CURL to no. Failing that set debug to yes and post me a copy of the output, I will help you to work out what is wrong.

  7. Hi Stephen

    I really like the ThinkTwit plugin, but as of late it has been giving me fits. Basically, I turned off my caching plugin, and now I can’t get ThinkTwit to show the icons for the various sites that I am listing Tweets for. If you take a look at my site, you’ll see what I mean. It’s very much hit-and-miss. I am also getting the following in my error logs:

    [29-May-2012 19:43:01 UTC] PHP Warning: file_get_contents() [function.file-get-contents]: Couldn’t resolve host name in /home/mysite/public_html/wp-content/plugins/thinktwit/thinktwit.php on line 369

    [29-May-2012 19:43:01 UTC] PHP Warning: file_get_contents( [function.file-get-contents]: failed to open stream: operation failed in /home/mysite/public_html/wp-content/plugins/thinktwit/thinktwit.php on line 369

    Are there some tweaks I can make to my .htaccess file that would help?

    Awaiting your guidance and advice with thanks!


  8. Hi Jeffrey,

    I think this may be the same issue that a number of people are getting which is due to be fixed in an upcoming release – and that is images are not cached with tweets. I will try my very best to bring this to the front of the queue and get it fixed very soon – as you know my job is extremely busy at the moment and I’m not getting much free time but I will try to get it done soon (hopefully this weekend).

  9. Great find, thanks for sharing this plugin! I made a small donation.
    I slightly modified the code to add support for hashtag filtering. You can enter a hashtag in the widget and only tweet with that # are shown Something I needed for a project. Your code is well written and documented and it was easy to do. Something you could consider to add in the future. It should also filter out the hashtag itself out of the tweet and not show it.

    One other note, maybe I didn’t read the instructions well enough, but I also had avatars not showing at first and thought it was a bug. But of course I didn’t have the correct write settings on the /images folder in the plugin directory. Changed CHMOD to 777 and it’s all fine.


  10. Hi Martijn,

    Thanks very much for your donation, it is the first I have had and really, really appreciated! :)

    Thanks also for your feedback and I’m glad you found the coding and documentation well written. It is actually on my todo list to add #hashtag filtering, if you would care to share that code I’d be happy to include it. Also if you have any other changes you’d like I’d be happy to make them also.

    I will take a look at improving the instructions/functionality of the images folder – there is code in there to change the permissions but it doesn’t always work.

    Thanks again!

  11. Hello,

    It no longer seems to be working, probably due to the fact Tiwtter updated their API again. Any fixes for this around the corner :-)?

  12. Hi Martin,

    Have you updated to 1.4.1 and added your Twitter API application credentials? If not please do this and let me know if it has resolved the issue, otherwise please let me know and I’ll help you to debug it.

  13. I thought I did (had to update a whole bunch of stuff) overlooked your plugin LOL. Stupid me! It works fine :-D.

    Thanks for getting back to me so quick though! It’s appreciated.

  14. Steve, I cant get ThinkTwit to work at all for me. It just keeps saying “There have been no recent tweets” when obviously there has been. In the settings, I tried both a user and hashtag, and with and without the @ and #. What gives?

  15. Is it possible to add a word exclusion list to your plugin? I love the plugin and it works great, but it occasionally pulls in some “unsavory” content. It would be great to have a keyword/hashtag/user exclusion list.

  16. Hi Stephen,
    great plugin, thanks for making it. Im relatively new to WordPress and struggling to get the shortcode working – Its pulling in your tweets. Where am I going wrong with the below code?


  17. Hi Aaron, sorry for the delay in getting back to you and thanks for the positive feedback. I certainly could add an exclusion list to ThinkTwit, I’ll add it to the roadmap. Thanks for the suggestion, it’s a great idea!

  18. Hi Colin, sorry for the delay in getting back to you, I’ve been extremely busy lately. I hope you have fixed your issue by now but if not it’s because you’ve used “show_username” instead of “show_author”.

Leave a Reply