WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
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

WPBeginner» Blog» Tutorials» How to Display Recent Tweets in WordPress with Twitter Widgets

How to Display Recent Tweets in WordPress with Twitter Widgets

Last updated on August 10th, 2019 by Editorial Staff
224 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Display Recent Tweets in WordPress with Twitter Widgets

Do you want to display your recent Tweets in WordPress? Integrating Twitter to your WordPress website helps increase engagement on both platforms.

Your blog visitors discover your tweets which helps you get new followers on Twitter. On the other hand, your Twitter followers discover more of your content, which increases traffic to your website.

In this article, we’ll show you how to easily display recent tweets in WordPress. We will also cover how to show selective tweets in WordPress.

How to Display Recent Tweets in WordPress

Adding Your Recent Tweets in WordPress – Step by Step

You can display your recent tweets in WordPress by simply embedding your Twitter profile or timeline.

Just like adding a YouTube video, WordPress also makes it easy to embed Twitter content like a single tweet, collection, list, likes, and moment into your website.

WordPress uses the oEmbed feature, which automatically turns any content URL into an embed code when pasted in the content area.

The most common place to display your recent tweets is usually your blog’s sidebar. Let’s start with that.

Adding Your Recent Tweets to Your WordPress Sidebar

First, you need to find and copy the URL of the Twitter profile that you want to embed. The Twitter profile URL is simply the combination of Twitter website URL and your Twitter username.

For example, the Twitter profile URL of WPBeginner is https://twitter.com/wpbeginner.

Twitter Profile URL

Next, log into your WordPress dashboard and go to Appearance » Widgets page. Simply drag and drop the text widget to your sidebar and then paste the Twitter profile URL that you copied earlier in the text area.

Paste Twitter Profile URL to WordPress text widget

Once done, it will immediately turn into a Twitter timeline widget showing recent Tweets from that particular account.

Save Your Recent Tweets Widget in WordPress

After that, you can name your widget, save it, and preview it live on your site. Here’s how our recent tweets appear on our demo website.

Recent Tweets in WordPress Demo Site - With Text Widget

As you can see in the screenshot above, this method adds your recent tweets inside a box with a vertical slider. The box includes 20 most recent tweets and the ‘Load more Tweets’ button at the end.

Embedding Twitter Feed in WordPress with Twitter Publish

Replacing the Twitter widget feature, Twitter now has Twitter Publish feature for embedding Twitter content into websites.

Twitter Publish lets you easily create the embed code for various types of Twitter content, including a tweet, collection, profile, list, moment, hashtag, etc.

Twitter Publish for Embedding Tweets into Websites

To use this method, you need to visit the Twitter Publish website and then paste your Twitter profile URL in the ‘What would you like to embed?’ box.

Enter Twitter Profile URL in Twitter Publish

Once done, click on the arrow icon.

After that, it will ask you to choose a display option: Embedded Timeline or Twitter Buttons. Choose the ‘Embedded Timeline’ as you want to show your Twitter timeline with recent tweets.

Twitter Publish Display Options

Upon selecting the display option, it will instantly create the embed code for your recent tweets. Now click on the Copy Code button.

Copy Twitter Embed Code from Twitter Publish

Next, you need to go to Appearance » Widgets from your dashboard and add the ‘Custom HTML’ widget to your sidebar area. After that, paste the embed code that you copied earlier in the HTML field.

Paste the Twitter Profile Embed Code in Custom HTML widget

Once done, save your widget and see your recent tweets live on your website.

Here’s how our Twitter feed looked on a test site.

Recent Tweets in WordPress - Demo Website

Embedding Your Recent Tweets in WordPress Blog Posts

Sometimes you may need to embed your Twitter timeline in your blog posts or your about page.

WordPress comes with a Twitter embed block for the new WordPress block editor.

Simply create a new post or edit an existing one. On the post edit screen, add the Twitter embed block in your content area.

Add Twitter Embed Block in WordPress Editor

Now you need to paste your Twitter profile URL and click the ‘Embed’ button.

Embed Twitter Timeline in WordPress Post

After that, WordPress will automatically fetch and display your recent tweets in the content area.

Twitter Profile Embedded in WordPress Post

This method adds a Twitter feed with a scrollbar in your post.

Alternatively, you can also use the Twitter Publish method, which will allow you to show recent tweets without the scrollbar.

Go to the Twitter Publish website and paste your Twitter profile URL in the ‘What would you like to embed?’ box and click the arrow next to it.

Enter Twitter Profile URL in Twitter Publish

After that, choose the ‘Embedded Timeline’ option and then copy the embed code.

Copy Embed Code for Twitter Profile

Next, you need to add the ‘Custom HTML block in your post editor to paste the embed code.

Add Custom HTML Block in WordPress Editor

Now you can paste the embed code you copied earlier.

Paste the Twitter profile Embed Code in Custom HTML Block

Once done, save your post and preview it live.

Showing Selective Tweets in WordPress

Embedding your Twitter profile will show all your recent posts on your website. What if you wanted to show the selected tweets only?

Don’t worry, there are simple solutions for that too. There are mainly 5 ways to embed selected tweets into your website.

  • Collection: Show a curated collection of tweets according to topics, interests, conversations, and more.
  • List: Display tweets by a curated group of Twitter users.
  • Likes: Show all tweets a specific Twitter user has marked as likes.
  • Moment: Show tweets from a public moment by a Twitter user.
  • Hashtag: Display tweets by anyone containing a specific hashtag.

Among these options, you can create the last four selections right from the Twitter website. Also, you can copy their respective URL and paste in your WordPress sidebar using the text widget.

For example, you can find your Twitter lists in your Twitter profile page. Select any one list you want to embed and click on it.

WPBeginner Twitter Lists

Upon clicking on the link, the list will open, and you can copy the list URL from your browser. For example, the URL of our Twitter list ‘WordPress Experts’ is https://twitter.com/wpbeginner/lists/wordpress-experts.

Now you can paste this URL in your WordPress sidebar.

Add Twitter List in WordPress Text Widget

Similarly, you can find the URLs of likes, moment, and hashtag from your Twitter profile page, and easily embed into your WordPress site.

However, you need to use Twitter’s advanced TweetDeck feature to create a collection. A Twitter collection is a list of tweets organized under a topic by a user.

Visit TweetDeck website and sign in with your Twitter account. When the TweetDeck dashboard opens, click on the ‘Add Column’ button on the left panel.

Add Column in TweetDeck Application

Next, you need to choose the ‘Collection’ option.

Choose Collection Option in TweetDeck

After that, you can name your new Twitter collection.

Create New Collection in TweetDeck

Once done, you will see a new column added to your TweetDeck dashboard.

Drag Tweets to Twitter Collection

Now, you can drag tweets from your Twitter home or any user account and create your collection.

Once you have added tweets in your collection, you can embed it into your website. Click on the Options icon and then click the Share option. After that, select the ‘Embed Collection’ option.

Embed Collection from TweetDeck

Upon clicking on Embed collection, the Twitter Publish page will open with the embed code for your Twitter collection.

Copy Embed Code for Twitter Collection

Copy the embed code, and then paste it into your website using the Custom HTML widget.

Embed Twitter Collection with Custom HTML Widget

Once done, save your widget and see your Twitter collection live on your website.

We hope this article helped you to learn how to show recent tweets in WordPress and how to show selective tweets in WordPress. You may also want to see our list of the best social media plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

224 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

31 Comments

Leave a Reply
  1. Kate says:
    Oct 25, 2019 at 1:14 pm

    Hi, I was following the first set of instructions, but when I paste my Twitter URL in the text box nothing happens. I don’t know if it matters that I have Divi Builder enabled on my wordpress site?

    Reply
    • WPBeginner Support says:
      Oct 28, 2019 at 11:28 am

      If it’s not embedding properly, you would want to try adding the twitter embed block and placing the url there.

      Reply
  2. Glenn says:
    Nov 23, 2017 at 10:47 pm

    This seems to be an older article…I’m wondering how I can show my timeline..not my tweets but the people I follow. The Twitter Widgets page only shows Search, not my timeline or a list.

    Thank you.

    Glenn

    Reply
  3. Minhazul Islam says:
    Feb 21, 2017 at 4:19 pm

    Is there any plugin to do the same task?

    Reply
  4. Greg McGee says:
    Jan 13, 2017 at 3:16 pm

    I have successfully created a twitter feed on my wordpress site. Yaaay!!! Now the bad news. It disappears after 3 seconds. Booo!!! Where can I change the parameter that sets this limit? It is hiding from me very well. But I’m not all that smart, either.

    Reply
  5. Gopal sharma says:
    Apr 6, 2016 at 7:22 am

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

    Reply
  6. onya icha says:
    Jul 27, 2015 at 2:40 am

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

    Reply
  7. Simeon Opeyemi says:
    Jul 17, 2014 at 4:06 am

    Thanks. it worked for me!

    Reply
  8. gertrude says:
    Feb 17, 2014 at 7:03 am

    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

    Reply
    • WPBeginner Support says:
      Feb 17, 2014 at 9:40 pm

      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.

      Reply
  9. K.T. Lynch says:
    Jan 28, 2014 at 2:53 pm

    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.

    Reply
    • WPBeginner Support says:
      Jan 28, 2014 at 6:19 pm

      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.

      Reply
  10. Ines TR says:
    Jan 21, 2014 at 1:32 pm

    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.

    Reply
  11. Abdul says:
    Nov 22, 2013 at 6:44 pm

    How do I get it on a wp page?

    Reply
    • WPBeginner Support says:
      Nov 23, 2013 at 10:55 am

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

      Reply
  12. Douglas Vautour says:
    Nov 18, 2013 at 11:04 pm

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

    Reply
  13. Ann says:
    Nov 15, 2013 at 12:54 pm

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

    Reply
  14. Nancy Closson says:
    Sep 23, 2013 at 5:33 pm

    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

    Reply
    • WPBeginner Support says:
      Sep 23, 2013 at 7:33 pm

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

      Reply
  15. gaston says:
    Sep 12, 2013 at 11:31 am

    very useful!!

    solved it in a buzz!

    thanks!

    Reply
  16. Shana Manuel says:
    Jul 9, 2013 at 3:46 pm

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

    Reply
  17. Founterior says:
    Jun 23, 2013 at 7:12 am

    It works just fine !!!

    Reply
  18. patty says:
    Jun 14, 2013 at 1:28 am

    Sweet. Thanks for this!

    Reply
  19. Bill Hutchison says:
    Jun 12, 2013 at 10:49 pm

    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.

    Reply
  20. Joan says:
    May 29, 2013 at 6:32 am

    I have a question:

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

    Thanks

    Reply
  21. Chris Race says:
    May 18, 2013 at 5:04 am

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

    Reply
  22. Rickard says:
    Apr 18, 2013 at 4:16 am

    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?

    Reply
    • Editorial Staff says:
      Apr 18, 2013 at 8:12 am

      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.

      Reply
  23. Julien Maury says:
    Apr 17, 2013 at 6:16 pm

    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”.

    Reply
    • Gordon Chambers says:
      Apr 29, 2013 at 8:13 am

      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?

      Reply
      • Julien Maury says:
        Apr 29, 2013 at 9:51 am

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

        Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WPForms Logo
WPForms
Drag & Drop WordPress Form Builder Plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
MonsterInsights Coupon Code
MonsterInsights Coupon
Get 50% off MonsterInsights, the best Google Analytics plugin for WordPress.
Imagely Coupon
Get 20% OFF on Imagely WordPress photography themes and plugins.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.