Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Display Recent Tweets in WordPress with Twitter Widgets

Last updated on by
Follow WPBeginner on YouTube
How to Display Recent Tweets in WordPress with Twitter Widgets

Twitter is one of the most powerful and highly influential social networking tool on the planet. At WPBeginner, we regularly use Twitter to monitor WordPress related discussions, interact with our audience, and help other users. Recently, one of our users asked us what is the easiest way to display recent tweets in WordPress. The answer is the official recent tweets twitter widget. In this article, we will show you how to display recent tweets in WordPress with Twitter Widgets.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

First thing you need to do is go to the Twitter Widgets page. If you are signed in with your Twitter account, then it will already show you a sample widget with your user id. You can adjust the size and look of the widget. There are a few options such as choosing either a light or dark theme, set the widget height, choose link color etc. By default, the width of the widget is automatically adjusted so you don’t need to worry about that. Once you are done with the appearance of the widget, click on “create widget” button.

Recent Tweets Widget Preview

To add this user timeline twitter widget to your WordPress, copy the widget code and go to your WordPress admin area Appearance » Widgets. Drag and drop a text widget to your sidebar and paste the Twitter widget code inside it. Save widget changes and preview your site.

Adding Twitter widget code in a WordPress sidebar widget

You should be able to see a live preview of your recent tweets widget. If everything looks good, then you are done. Congratulations, you have successfully added recent tweets in your WordPress sidebar. If you want to add it in any other area of your site such as a WordPress post or page, then simply paste the widget code in your WordPress post/page’s content area, and it will work the same.

But wait, there is more. Twitter widgets page not only allows you to create a timeline of your recent tweets, but it also allow you to show timeline for your favorite tweets, lists, and a hashtag or search keyword. If you want to do that, then the steps are fairly simple.

Go to the Twitter Widgets page. Instead of using the User Timeline tab which is selected for you by default, click on the other tab such as favorites, lists, or search. Then configure the settings by selecting your favorite list, hashtag, etc.

Choose Timeline Source

The steps from this point on are fairly straight forward because they are the same as the user timeline widget. For favorites, the settings are exactly the same as user timeline widget. For lists, you have to select the list you want to include. For Search, you need to add the hashtag that you want to display.

One of the biggest advantage that we see for using a recent tweets “user timeline” twitter widget is that it has a Follow @username button which allows for 1 click follows to your account. Furthermore, it allows your users to tweet mention you right from your site (now that’s pretty cool).

We hope that this article helped you easily display recent tweets in WordPress using the official user timeline twitter widget. If you have any questions or comments, then feel free to let us know by leaving a comment below.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • gertrude

    I added this but apart from a link to my tweeter it doesn’t do anything. I have wordpress 3.8.1 and activated the default theme, then switched back to the one I am using. Still nothing. If there is any way you guys can help it would be great. Thanks

    • http://www.wpbeginner.com/ WPBeginner Support

      Trying switching off all plugins and then test, particularly if you are using any Twitter related plugin. If this does not work, then you need to break the widget code into two pieces. Paste the javascript part starting from the <script> in your theme’s header.php, and the link part in a text widget.

  • K.T. Lynch

    For some reason the closing HTML tags are stripped out once I press save. This is appearing on my WP Sidebar:

    Tweets de @lynchkt !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?’http’:’https’;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+”://platform.twitter.com/widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);

    The “Tweets de @lynchkt” is a hyperlink but otherwise it’s not working.

    • http://www.wpbeginner.com/ WPBeginner Support

      This could happen for many reasons. If you are using WordPress 3.8 then try to update to 3.8.1. Try switching to a default theme temporarily and see if you still get this error.

  • Ines TR

    Hello!
    I just see a buncg of words in my blog page after pasting the widget , why?
    I saved it and tried several times but can´t fix the problem.

  • Abdul

    How do I get it on a wp page?

    • http://www.wpbeginner.com/ WPBeginner Support

      you can paste the same code in WordPress pages as well as posts.

  • Douglas Vautour

    Thanks a lot! All of the twitter widgets I found wanted way too much information! I feel better getting it from the source.

  • Ann

    Hi!
    Thank you for sharing this. My regular Twitter widgets just weren’t working!

  • Nancy Closson

    I am looking for a widget that allows you to select tweets from one twitter account rather than show all or recent tweets. Is this customization possible and is that what you describe with the favorites list? thanks you

    • http://www.wpbeginner.com/ WPBeginner Support

      yes this customization is possible but with these widgets. The favorites widget will show the tweets you have marked as favorites.

  • gaston

    very useful!!

    solved it in a buzz!

    thanks!

  • Shana Manuel

    Wow! This took me 5 minutes to set up and I’m a total novice! Thanks for this article.

  • Founterior

    It works just fine !!!

  • patty

    Sweet. Thanks for this!

  • Bill Hutchison

    Thank you for this. I have used widgets for this in the past but have been generally unsatisfied with the results. The seems to be the best solution for including Twitter in the sidebar.

    Thanks again.

  • Joan

    I have a question:

    Is it possible to personalize the twitter widget weight? With the old twitter code was possible.

    Thanks

  • Chris Race

    Thanks for this article! Was looking for a new widget as my old one stopped working – and found this simple solution. Great!

  • Rickard

    I don’t know, but every single solution I’ve tried to use is messing with the admin panel more often than anyone can find ok.

    Is there anyway to fight the “waiting for platform.twitter.com” which breaks many functions in the WP-admin-panel?

    I guess this happens because of a overload on platform.twitter.com(?) and pages in the wp-admin-panel will continue loading forever…

    Might there be a way to set a time limit for the call, and if not found ignore it?

    • http://www.wpbeginner.com Editorial Staff

      This should have no impact on your WordPress admin panel. You are adding this in the widgets which only loads in the front-end of your website.

  • Julien Maury

    I cannot agree more. There is another great thing with widget, they use streams (see streaming APIs) so you can display A LOT of tweets without worrying about rate limits.

    And if you want to get a special feature you’ll add data-chrome=”noheader,nofooter,noborders,transparent” in the link. These new parameters allow you to make widgets “design friendly”.

    • Gordon Chambers

      Hi,

      I’ve been trying the above but when I click save it changes the value added in the ID box to a shortened number. I have tried to add both my twitter accounts and it does the same?

      • Julien Maury

        That’s weird. Check the quotes – they have to be real quotes not like in this comment section.