In this article, we’re going to take a look at the quickest and easiest way to embed a tweet in your WordPress sidebar. Like most things with WordPress, there are multiples way to accomplish this. We’re going to focus on using the methods that are built into WordPress core, and don’t require a plugin.
SEE ALSO: How to Embed a Facebook Post in Your Sidebar
You can embed your own tweets into a WordPress sidebar, or any tweet found on a public profile. All you’ll need is the tweet URL, which I’ll show you how to locate. Without further ado, let’s get started.
Several ways to embed a tweet into your WordPress sidebar:
- Using oEmbed (what is oEmbed?)
- Using the
01Embed Tweet Using oEmbed
To embed a tweet in your sidebar using oEmbed, all you need to do is paste the tweet URL into a WordPress Text widget.
Find Your Tweet URL
First, navigate to twitter.com, which will display your Twitter feed. All the tweets of those you follow will show up here, reverse chronologically.
Then, find the date that the tweet was published.
Now, you can either…
- right-click the date, and choose to Copy Link
- click on the date, and then copy the URL in your address bar
Either way, be sure the tweet URL is copied to your clipboard.
Go Back Into WordPress
Now head back into your WordPress admin area, and navigate to Appearance > Customize.
Click on Widgets, and find the widget that you’d like to add your tweet to. Depending on your theme, you could have several widgets listed.
Now click the + Add a Widget button.
Type in “text” in the search box to quickly locate the Text widget. Add this widget to your sidebar by clicking on it.
Now simply paste the tweet URL into the Text widget, and watch it magically appear in your sidebar.
If you’d like a title to appear above the tweet in your sidebar, simply enter one in the box labeled “Title.”
Publish or Schedule Your Embedded Tweet
The final step is to publish or schedule your tweet to go live in your sidebar. Choosing Publish will make the tweet appear immediately, or you can Schedule it to go live at a later date.
Learn how to schedule WordPress changes in the Customizer.
Most of you will prefer to use the previously mentioned oEmbed method. That will embed a tweet in your sidebar responsively, and automatically adjust to the user’s screen size.
However, if you want to place an explicit width or height on your embedded tweet, you can use the embed shortcode.
You’ll follow the same process, up through adding the Text widget to your sidebar.
Instead of just pasting the URL into the widget, you’ll use the
embed shortcode instead.
Switch from the Visual mode to Text mode.
Your screen should look like this:
The width and height parameters are completely optional. You can use just one or the other, and they can be set to any value. The value is in pixels.
Adjusting the width and/or height is really the only reason I can think of why you’d want to use this method over the oEmbed method of just pasting the URL in the Text widget.
If you have any questions about embedding a Twitter tweet in your WordPress sidebar, please let me know in the comments.