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.
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.
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.
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:
- Edit your post or page.
- Click once on the Twitter URL.
- Click the “unlink ” button in the toolbar.
- Update or publish your post or page.
Have you tried this yourself? Did you manage to get it working? Let me know in the comments below.
Always works like a charm. So awesome that WordPress makes it so so simple.
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.
Thank you for such a wonderful tutorial!
Yep! Fantastic explanation on something that is not intuitive.
Thanks for that! Great explanation – took me just 3 min to do.
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.
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 🙁
Max, Try to make sure that in the editor the URL is not a link. I added instructions how to do that.
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.
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.
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
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 );
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.
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
The only thing I can think of is to make sure they appear one link per line. Do you have a url of the page?
The above method is too flaky. Try this, works guaranteed
https://dev.twitter.com/docs/embedded-tweets
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. 🙁
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
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!
It looks like there is a fix coming in 3.8.1
It worked great for a while and then stopped working. Now it is just showing the link (without being a link). Any solutions?
Upgrade to WordPress 3.8.1 (or wait for the auto-upgrade) and you’ll find it works again. You may need to re-save the posts that weren’t working.
That worked. Thanks
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.
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
Hi Gavin,
This definitely works with the latest WordPress (3.8.1) and following the instructions above.
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.
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…
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
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..
Perfecto! Thanks
Works perfectly fine. Thanks Mikelittle
Hi
The styling is awful, however I presume that’s just due to the blockquote default css that my theme is using?
The styling should come from Twitter itself as the tweet is embedded as an iframe.
thank you for the method
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.
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
Hi Luke,
I don’t think there is. At least not with this embedding method.
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!!
It’s amazing that I went to Google in search of a plugin and all I had to do was copy & paste. LOL
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
😂