How to Embed a Tweet in your WordPress Post

Written by: Muninder

Updated: December, 11, 2011

With the New Twitter 2.0 making all the news, a little feature was also introduced along side called Embed Tweets. It didn’t attract many eyeballs as it was presented as a byline item and not many popular blogs covered it. Maybe some of them underestimated this feature.
Do you remember something called the Blackbird Pie ? I hope you do, because Blackbird pie was introduced during New Twitter 1.0. It was more of a plugin than an actual feature where-in you had to copy the tweet url first and then paste it in the blackbird pie input area. Only then you’d get the code to embed.

Embed Tweets
Embed Tweets Box on the New Twitter

Thankfully blackbird pie is no longer available and we can embed tweets specifically and directly. Both the ly‘s sound really good and make our job easier. More importantly the embedded tweets load quickly and are less-clustered (thanks to some good spacing in between lines/divisions).

Embed Tweets Directly

  1. Open a Tweet in detail view. (Example)
  2. Click the Embed this Tweet button. Then in the HTML tab a code will appear, copy it to your clipboard.
  3. You can align & adjust the text wrapping of the tweet. So choose it the way you want.
  4. Assuming that your WordPress Edit post page is open. Click on the HTML section of it and paste the tweet embed code you just copied.
  5. If you see the embed code has a <script> tag as well. That is the intent script, specifically for Reply, RT, Favorite & Follow functions.
    Tweet buttons also include the intent script. So if your blog already has one then you can delete that part of the embed code so as to avoid multiple same-scripts.

    <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
  6. We are done with the Tweet Embedding process.

I would recommend this method even though a longer code needs to be copy-pasted in your WordPress post. Better than a plugin, any day. Below is an example of the tweet which is embedded by the above method.

I hope the above tutorial helped you to embed tweets easily in your WordPress posts.
In hindsight we could say that Twitter could’ve implemented this much earlier, but anyways we all must appreciate this move.
Don’t you think so?

by

Copyright @2021 Dailyblogging.org