How to embed a tweet on a WordPress post?

When you want to embed a tweet on a WordPress post you have a couple of options on how to do it. All of them super simple to do.

The Simple Way

Simplest option is to just paste URL for a tweet to the post and WordPress is smart enough to show the tweet in the post and not the URL.
https://twitter.com/pkdigib/status/801510558390484995

You can find the URL for the tweet from the menu that can be accessed via three dots below the tweet in question.

How to embed a tweet on a WordPress post?

I thought that I would need to install a plugin to achieve this and was thus pleasantly surprised that it was possible to do this out of the box.

Alternatively, you can choose from the menu “Embed Tweet” which gives you a piece of code you then paste into the blog post. End result is exactly the same

 

<blockquote class="twitter-tweet" data-lang="en">
<p dir="ltr" lang="en" style="text-align: right;">I am struggling with these in my <a href="https://twitter.com/hashtag/Headlines?src=hash">#Headlines</a> <a href="https://t.co/fhABSeXFPO">https://t.co/fhABSeXFPO</a></p>
<p style="text-align: right;">— pkdigibiz (@pkdigib) <a href="https://twitter.com/pkdigib/status/801510558390484995">November 23, 2016</a></p>
</blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

(Slightly) More Advanced Way

The problem, if you want to call it that, with previous approaches is that they don’t offer much control to the way tweet is presented.

If that control is needed you can install the official Twitter plugin. With that installed you can insert tweets with a shortcode. The code below, for example, shows the same tweet as above but aligned to the right.

[ tweet id="801510558390484995" align="right"]

Do note that I had to insert an extra space before the shortcode to not render it in the same way as the tweet to the right here.The full list of parameters can be found from the Twitter

The full list of parameters can be found from the Twitter documentation.