Use the Twitter block to embed tweets into your posts and pages.
In this guide
To add the Twitter block, click on the + Block Inserter icon and search for “Twitter”. Click it to add the block to the post or page.
Using your keyboard, you can also type /twitter on a new line and press enter to quickly add a new Twitter block.
For more, visit our detailed instructions on adding blocks.
To embed a tweet means that you can display an individual tweet on your site that includes:
- The tweet’s text, images, and links.
- Action buttons for Twitter users to retweet and favorite tweets without leaving your site.
- Links to hashtag pages, usernames, and a follow button.
The quickest way to embed a tweet is to paste the URL of the tweet on an empty line in the editor.
To find the URL, locate the tweet you want to post. Then click the timestamp as marked with the arrow below:
You’ll be taken to the page for that individual tweet. Copy the URL from the address bar that looks like this:
On Twitter, you can also click the down arrow at the top right of the tweet to find the Copy Link to Tweet option.
Twitter also has an ‘Embed Tweet’ option with a code. This method is not supported, so make sure to use the link instead.
Once you have copied the URL, paste it on an empty line in the WordPress editor. It will automatically become a Twitter block and the tweet will become embedded on your site.
Alternatively, you can add the Twitter block as explained in the previous section. There is a box to enter the URL (i.e., link) to the tweet you want to embed. Paste that link into the box and click Embed.
Here’s how a single tweet looks when embedded:
You can also use the Twitter block to embed a feed. The quickest way to embed a feed is to paste the URL of the Twitter profile on an empty line in the editor. It will automatically become a Twitter block and the feed will become embedded on your site.
If you add the Twitter block first, you can paste the profile URL inside the box and click Embed:
Here is an example of an embedded Twitter feed:
When you click on the block, a toolbar of options will appear above it:
The Twitter block has the following options in its toolbar:
- Change block type.
- Drag the block.
- Move the block up or down.
- Change the alignment (left, right, or center, plus wide and full-width if supported by your theme.)
- Edit the URL of the tweet
- More options
You will find additional block settings in the right sidebar when you click on the block. If you do not see the sidebar, you may need to click the Settings icon in the top-right corner to bring up the settings. This icon looks like a square with two uneven columns:
Keep the option Resize for smaller devices enabled if you’d like to preserve the aspect ratio on different browser sizes.
The advanced settings allow you to an HTML anchor and additional CSS classes for the current block.
Learn more about HTML anchors here. You can also learn more about adding additional CSS classes to blocks here.
If you want more control over the display and layout of the tweet you are embedding, you can use a shortcode instead. Once you have assembled a shortcode as explained below, place it into a Shortcode block and it will display the embedded tweet.
To create a Twitter shortcode, type the [ symbol, the word
tweet, the URL of the tweet, and close it with the ] symbol like this:
Using the following parameters, you can control the appearance in a number of ways:
- Adjust the width using
width='200'(replace 200 with your desired width.)
- Display the Twitter buttons in a different language using
frwith the desired language code.)
- Align the tweet to the left, right, or center using
- Hide the image or other media item using
- Hide context from replies using
You can combine any number of parameters in your shortcode as in the following example:
[tweet https://twitter.com/wordpressdotcom/status/632582884654751744 width='250' lang='ko' align='center']