How to Embed a Tweet in a WordPress Post or Page

If you want to embed a tweet in a WordPress post or page, WordPress supports a really simple way to do it. It takes just three simple steps.

Step 1

Start with the URL of the tweet. The easiest way to get that is to look at the tweet on its own and not on the Twitter homepage or in someone’s twitter stream. Click on the timestamp just to the right of the tweet. It usually has the age of the tweet like “30m” or “4h” or else a date like “2 Jul”. Once on that page showing just that one tweet (and maybe some replies), copy the URL from your browser’s address bar to the clipboard.

Alternatively, right-click the timestamp link and select “Copy link address” or whatever your browser uses.

Image shows the location of a tweet's URL

Step 2

Next, back in your WordPress dashboard, paste that URL into your post or page on a line on its own. Make sure it is not a link, just plain text.  If it does get pasted as a link (it will show blue and underlined) you can click once in the link and click the “unlink” toolbar button.

paste_tweet_URL

Step 3

Publish your post or page and enjoy a fully interactive tweet embedded on your site. It’s as simple as that.

Even the “Follow”, “Reply”, and “Retweet” buttons work.

embed a tweet in a WordPress post

The Result: An Embedded Tweet

Here’s an example embedded in this post.

Update: If it Doesn’t Work

If it doesn’t work for you and your site just shows a link, it will be because your browser has pasted the URL as a link into your post or page. To remedy it, follow these steps:

  1. Edit your post or page.
  2. Click once on the Twitter URL.
  3. Click the “unlink ” button in the toolbar.
  4. Update or publish your post or page.
Unlink_a_link

Have you tried this yourself? Did you manage to get it working? Let me know in the comments below.

50 thoughts on “How to Embed a Tweet in a WordPress Post or Page”

  1. Lol I can’t believe it took me over an hour to figure this out until I gave up and googled it, great job Mike, your explanation along with the screenshots were perfect.

  2. I cannot get this to work–It only leaves the link despite following your directions, but does not add any of the details from Twitter. Do you need WordPress Pro?

    • Becky,
      It sounds like your browser has pasted the URL as a link. To fix that, go back to editing the post or page. In the editing box, click on the Twitter url once, then click the break link icon on the toolbar (next to the link icon). Save your changes and try it again. I’ve added these extra instructions to the article.

      • Hi Mike,

        Thank you for getting back to me so quickly. The problem was that I was in visual editing mode instead of text. Once I switched the view it worked.

  3. Hello Mike, it doesn’t work in my wordpress. I’ve tried many times, but it still show the URL not embed tweet from twitter. I don’t know what’s wrong 🙁

      • I also get this issue, it’s just showing as the url (unlinked). I end up having to use the embed code given by twitter.

  4. How do you post a tweet MINUS all the replies? Really popular tweets tend to come with tens, if not hundreds of replies but I don’t want these in my WordPress post. I just want the original tweet. Thank you for your help.

  5. Hi Sierra,
    I know if you look at the individual tweet on Twitter it includes all the replies, but when I embed a tweet with replies in to a post, It only shows the original tweet.

    I’ve updated my example above to embed a tweet that has a reply (where it says “the Result”). It only shows the original tweet, but if you click on the date stamp it takes you through to twitter.com where you can see it has a reply

    Hope that helps,
    Mike

  6. Hi Mike, thanks for this tip and it works like a charm. If you don`t mind and if I can explain well, I would like to ask a question on using tweets in post.

    Lets say I have a post which have 300 words and a picture. On my main page I show the image and short description (excerpts) with a “read more” link next to it and when clicked it opens the main post page with full post details.

    What I would like to do is, I want to show picture and short description as normal and show 2 tweets related to that post on the main page with a read more link. And when they click on read more they see full article with an image and all the embedded tweets under the post! Any suggestions?

    Regards

    • The only way you could do that is to use a plugin that allows you to use autoembeds in your excerpts. I’ve not seen on that does that though there may be some.

      Or, if you are confident with your editing your theme’s functions.php you can add the following two lines of code:


      add_filter( 'the_excerpt', array( $wp_embed, 'run_shortcode' ), 8 );
      add_filter( 'the_excerpt', array( $wp_embed, 'autoembed'), 8 );

  7. What about the size of the tweet? How can we change its size, I tried the WordPress instructions from the official post, but that is not working for me.

  8. Hey!

    Thanks for your instructions but it does not work on my WP. I am trying to embed all the tweets onto one post, but when I save the changes they all go away and disappear. So then I edit the post, break the links as you proposed, but still got the same problem. The tweets won’t appear on my post. Only one appears. I have tried everything and so far it does not work. Any recommendation will be much appreciated.

    Cheers

    • Gordon,
      The second half of the information on that page is exactly what WordPress does for you. It uses the oEmbed protocol to retrieve the HTML from Twitter and save you from having to write it yourself. The majority of WordPress users are not HTML savvy and this kind of functionality allows them to get on with writing great blog posts and articles without having to worry about closing tags and attributes.

      • Sure. but this in this case is it just matter of copying and pasting the HTML embed code from Twitter into your post nothing else. I found WordPress built-in capabilities unpredictable hence my suggestion.

        Cheers

        • You have to switch to text mode to be able to copy and paste in html, and that’s scary for a lot of users. Whereas this method only requires you to paste in a URL in either visual or text mode, it really couldn’t be simpler.

          I’d be interested to know which of WordPress’ built-in capabilities you find to be unpredictable.

          • Unfortnately neither your way to do it NOR pasting the html code provided by twitter works for my blog apparently. I use 3.8+ and nothing, it just shows up as either a text link (mike’s method) OR just as a quoted text. Not the embedded tweet. 🙁

  9. Folks,
    it looks like Twitter changed something at the beginning of January that has broken the auto embedding. Currently WordPress does not autoembed for any new tweets you try to embed or if you re-save any old ones.

    This tweet here

    https://twitter.com/cftp/status/424148190674563072

    Includes a link to a temporary fix plugin that will remedy the situation (at least it did for me).

    The fix (https://core.trac.wordpress.org/ticket/26844) should be in version 3.8.1 when it is released.

    Mike

  10. I have tried all the suggestions and read all the comments. Tweet Embedding is not working in my WordPress blog. Is there a fix for it?

    thanks!

  11. It worked great for a while and then stopped working. Now it is just showing the link (without being a link). Any solutions?

  12. Hi

    I have a wordpress 3.8.1 issue – the insert/edit link button doesn’t work. I will highlight the word I want to link from and click on the button and nothing happens. I have contacted WordPress/read forums etc but have had no reply. I have also googled it and its not helped. I need someone to tell me what I can do – I have re-installed it, removed cookies and browser history and I don’t know what to do next. I have no training in WordPress and hope you can help…..

    • It could be a problem with one of your plugins or your themes. Try disabling all plugins and switching to a built in theme. If it now works, then one of those was causing the problem.

      Re-enable the theme and your plugins, one at a time, testing each time. When it breaks again, the last thing you enabled is the culprit. Contact the theme or plugin author.

  13. I’m not getting this to work. I have no plugins installed and I have changed to the built in 2014 theme of wordpress but it still does not work

  14. Hi Mike

    Any idea how I might use have the twitter profile image as the featured thumbnail image when posting a single embedded tweet as a post?

    • Hi Gareth,
      You would need to upload the image to your site as WordPress doesn’t let you set an external image as the featured image (thumbnail). You would need to make sure you have the rights to do that first, of course.

  15. Howdy Mike,

    Great post! It made everything sound easy, but I’m not seeing the tweet embedded in my post. I have confirmed it’s not a link. I’m running WP 3.9.1 with the Omega theme. Any ideas? Thanks…

  16. Hi Mike,

    A WordPress newbie here. I searched for help with this for a while, thinking I’d have to “endure” yet another Plug-in this or Cherry that. As long as it took to grab the URL, paste it (text view) and hit update, is how long it took to get this done. Thank you so very much.

    I am so bookmarking your page! 🙂

    Claudia

  17. You know what? I’ve really searched for months about this topic and I couldn’t find the solution and it was getting me insane day by day, until today. Thanks for your solution. From now on, I can share tweets in my blog. Thanks..

  18. Hi

    The styling is awful, however I presume that’s just due to the blockquote default css that my theme is using?

  19. Thanks for the helpful article!! I really appreciate it Mike!! I tried the instructions to do this on Twitter’s site and it didn’t even work. Now, it is working like a charm.

  20. Thanks for the article, is there a way of having an embedded tweet in an article shows the replies and comments of the tweet?

    I.e a Twitter post has 2 replies that can be seen on Twitter – I want to show them in an article.

    Thanks

  21. Thank you. I was pulling my dreads out trying to get past the underlines appearing stage but your post helped me to realise where I was going wrong.
    Great!!

  22. It’s amazing that I went to Google in search of a plugin and all I had to do was copy & paste. LOL

  23. Ok, this is crazy! I followed your instructions, and I did it many times! I couldn’t figure out what I was doing wrong! Apparently mobile needs to be removed to work: mobile.twitter
    ?

Comments are closed.