Twitter/X is one of the most important social media platforms of them all. To say the least, it helps us promote whatever we might have “in store.” I mean, there’s hardly a successful business out there with no presence on Twitter/X whatsoever.
Now, having an official account and posting to it regularly seems to be enough. However, there’s actually a lot more that can be done to multiply the results, and with relatively little effort on our part too.
Here’s our guide on how to integrate Twitter/X with your WordPress site. I go over each of the possible methods and give you a quick tutorial on how to get all of them working:
1. How to embed tweets in WordPress
So what do I mean by embed?
To embed a tweet in WordPress means to take an individual tweet and post it inside one of your pages or posts. The great thing about embedding a tweet is that it acts like an actual tweet on your site – you can interact with it like you normally would on Twitter/X.
Here’s an example (that’s a live tweet):
Happy 34th launchiversary, @NASAHubble! To date, the telescope has taken over 1.6 million observations of 53,000 astronomical objects, including this brand-new snapshot of the Little Dumbbell Nebula.
What did Hubble see on your birthday? https://t.co/qUtQlx6DfP pic.twitter.com/jBPeqyR7xx
— NASA (@NASA) April 24, 2024
What did I do to make it work like this? I just copied the tweet’s link and pasted it into WordPress directly. Here’s how:
When you find a great tweet, click on it and take its URL:
Then, go to any of your posts or pages, paste that URL in its raw form, and it will magically turn into a live tweet.
(By the way, you can embed anyone’s tweet wherever you want, not just yours.)
2. How to add Twitter/X cards
A Twitter/X card is basically an expanded tweet view, helping to drive traffic to your website:
A Twitter/X card can usually contain, apart from the regular tweet, a featured image, author details, an excerpt, even an image gallery. This depends on what sort of data was associated with the tweet.
Enabling a Twitter/X card for your posts will help you get more attention in the Twitter news feed, as your posts will simply take up more real estate than normal link posts.
You can use Yoast SEO to enable the Twitter/X cards functionality and integrate Twitter/X with WordPress. If you’re already using the plugin – and there’s a big chance you are – you just need to set a few options.
Go to the Site Representation page in the plugin’s settings, and enter in the “Other Profiles” box your Twitter/X username. Make sure to save the changes after you do that:
This is what the Other Profiles box looks like:
The next thing you have to do is go to Users » My Profile in the dashboard menu and fill in the Twitter/X username field in the Contact Info section. From now on, each time anyone tweets your posts, they will have cards associated with them.
After saving the changes, the last step is to go to the Site features page and enable the Twitter/X Card Data feature. Save the changes, and that’s it!
3. How to add a Twitter/X feed widget to your site
A Twitter/X feed is a real-time widget box that shows all your tweets in the form of a mini-Twitter/X page. It also allows the users to interact with you right from that box, without having to go to Twitter.
When used right, this sort of stuff can help you increase your visitors’ engagement with your Twitter/X account, and potentially bring you more followers. People won’t look for your Twitter/X account by themselves unless you throw them a chance and a comfortable way to do so.
To use a Twitter/X widget, go to this link, copy-paste your account’s URL then choose Embedded Timeline.
Next, the embedded code will appear along with a preview of your widget. Copy the code and paste it anywhere on your site. (Just make sure to be in the Text editor when you do that, it won’t work in Visual.)
Here’s my widget:
4. How to add the “follow me” and “share” buttons
If you care about your Twitter/X presence and want your visitors to interact with you, putting a follow button on your site will help. It’s like an invitation for those who are interested in your services/business/persona.
The button is simple, subtle, and yet very useful when it comes to promoting your brand. Best of all, your visitors won’t even need to leave your website to follow you, they can do it right there by clicking the button. In short, this is the proper way to integrate Twitter/X with WordPress.
To add your follow button, you just need to go to the same link we used at point 5 and make a few clicks. Go and click on Twitter/X Buttons, choose your desired button, in this case the Follow Button, and copy-paste your account’s URL.
After pressing Preview you will get the code to your follow button and a preview of it. You only need to paste the code via the Text editor (you can place this button on any given post or page, or even in a sidebar text widget) and you are good to go.
My button:
How to add a “share” button
Probably the most crucial button you can have on your posts when it comes to integrating Twitter/X with WordPress.
Quite simply, tweet buttons are those little things that allow your visitors to share your content to their Twitter/X profiles.
For instance, you can see something like this in our sidebar:
To add a Share button, simply follow the same steps used to add a Follow me button. The only difference is that you need to select the Share Button option.
5. How to auto-tweet new blog posts
To start with, how about we integrate Twitter/X with WordPress and set up your site in a way so it tweets your every new post automatically?
For that, you can use the WP to Twitter plugin. Once you have it installed, create a quick Twitter app, complete the required fields, browse through each tab to set the plugin the way you want, and save the changes.
Now, whenever you create a new post, you’ll notice a Twitter/X box in the right sidebar. It allows you to adjust the exact tweet that will go out when you publish the post:
This makes for a nice way to integrate Twitter/X with WordPress.
Okay, that’s all for now from our side! Feel free to comment and reach out to us in case you’re having any trouble integrating Twitter/X with your WordPress site.
Thank you so much for sharing this.
I wonder if there’s a way to aggregate twitter posts with links to my site and display them on the site.
Hey Erez, I am not sure there is a tool like this. Most work on mentions, handles, authors etc etc. I don’t *think you can even build the Twitter widget to track links like this. Could be wrong tho.
It would be a cool tool tho, so if anyone knows one…
Hi! Could you be more specific, please? I need more details to understand what you mean.
Thanks for your reply.
I am looking for a plugin that will add a twitter comment on the site whenever someone mentions your site on twitter.
There is a plugin for this but it hasn’t been updated for 5 years and probably not working well by now.
I think you could try this one https://wordpress.org/plugins/wd-twitter-feed/
It adds your Twitter mentions but only in a widget form, just like my Twitter feed in this post (at #5). It adds a feed but only with mentions, not your own tweets (as far as I understood). I’m not sure if it helps. You can try it, though. It’s free.
I’m unable to find what I’m looking for and this probably the closest thing out there.
Thanks for your comment.
Thanks for the post. Unfortunately #5 user timeline has been changed to profile and there is no option to exclude replies now 🙁
Hey, that’s right. Thanks for letting me know so I can update the post. Yeah, that’s pretty bad.
Awesome tips. I was looking for how to add inline tweet button for my blog bilalmustafaonline.com. In addition to that, I have learned how to auto schedule my old post. I was making a big mistake of sharing old post frequently. Now, I can do that as well. Thank you for sharing these valuable information.
And for my blog I am using the Zillah theme by Themeisle. So a big thumbs up for that awesome theme. 🙂
Hey, that’s awesome! I’m glad this post was useful to you. Also, my team and I are happy to hear that you’re using Zillah. Good luck! 🙂
This is such a helpful essay, thanks, Adelina. I have a question you
may help resolve. When I write a wordpress blog, I include a share to
my Twitter profile and write the preview there. Of course. I am used
to seeing my featured image with the tweet. Sometimes, instead of the
featured image being used, it just sucks up the link to the embedded
youtube video instead. This is unacceptable to me. Why is it
happening, and how do I ensure that my featured image is used by
Twitter? Until this is resolved, I cannot directly use the share
function. Thanks so much!
Hi Steven! This happens when you schedule blog posts for social media? Are you using Revive Old Post plugin?
Great Post Thanks
Thank you for helping me make sense of this. You explanations are so clear!
Glad I could help. 🙂
Thank you! I’m happy I could help. 🙂
Thank you very much for sharing this great list. I spent my Saturday afternoon improving the look of my blog http://www.parlonsmariage.info with these worthy tutorials. Bring more please!!!!
Thank you, Jean! Happy to hear so. Yes, we will bring more for sure. 🙂
By the way, this is our new blog https://revive.social/blog/, which will be only about social media. So take a look when you can and maybe you can find something useful there too.
Your blog looks great indeed. Good luck with it! 🙂
Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!