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

How to Display Recent Tweets in WordPress with Twitter Widgets

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
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 experts 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 »


  1. Gopal sharma says:

    This is the best tutorial i found ever.. :)

  2. onya icha says:

    on mobile all my tweets displays and make my website to look funny .pls how can i solve this problem

  3. Simeon Opeyemi says:

    Thanks. it worked for me!

  4. gertrude says:

    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

    • WPBeginner Support says:

      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.

  5. K.T. Lynch says:

    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.src=p+”://”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);

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

    • WPBeginner Support says:

      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.

  6. Ines TR says:

    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.

  7. Abdul says:

    How do I get it on a wp page?

  8. Douglas Vautour says:

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

  9. Ann says:

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

  10. Nancy Closson says:

    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

    • WPBeginner Support says:

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

  11. gaston says:

    very useful!!

    solved it in a buzz!


  12. Shana Manuel says:

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

  13. Founterior says:

    It works just fine !!!

  14. patty says:

    Sweet. Thanks for this!

  15. Bill Hutchison says:

    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.

  16. Joan says:

    I have a question:

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


  17. Chris Race says:

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

  18. Rickard says:

    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” which breaks many functions in the WP-admin-panel?

    I guess this happens because of a overload on 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?

    • Editorial Staff says:

      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.

  19. Julien Maury says:

    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 says:


      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 says:

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

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.