5 Ways to Integrate Twitter With WordPress (Beginner's Guide) 5 Ways to Integrate Twitter With WordPress (Beginner's Guide)

5 Ways to Integrate Twitter With WordPress (Beginner’s Guide)


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):

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:

twitter-card-exampletwitter-card-example

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:

Image of the Site Representation PageImage of the Site Representation Page

This is what the Other Profiles box looks like: 

Image of were to enter the URL to the Twitter AccountImage of were to enter the URL to the Twitter Account

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!


Image of the X Card Data featureImage of the X Card Data feature

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.

Image of Publish Page Embed OptionImage of Publish Page Embed Option

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.)

Image of Twitter Feed WidgetImage of Twitter Feed Widget

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.

Image of Publish X Page Follow ButtonImage of Publish X Page Follow Button

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.

Image of how two copy the codeImage of how two copy the code

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:

share-thisshare-this

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:

wp to twitterwp to twitter

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. 

Yay! 🎉 You made it to the end of the article!