6 Ways to Add Twitter to Your WordPress Site

Brian Casel
Samsung Is the Breakthrough Brand of 2012
View photos
Mashable Media Summit

Brian Casel is the founder of Restaurant Engine, a niche web design service built on WordPress. Ask about the White Label Partner Program. Connect with Brian on Twitter @CasJam.

[More from Mashable: Twitter Q&A: Ask Ben Affleck About ‘Argo’]

Do you have a blog? Chances are you have a Twitter account, too. Twitter and blogging (or running any type of business website) go hand-in-hand.

We use Twitter to drive traffic to our websites. We invite our website visitors to follow and engage with us on Twitter. One feeds the other and vice versa.

[More from Mashable: Reditr Is Like TweetDeck for Reddit]

Many experts agree that WordPress is the best way to power your website, especially if you operate a blog. I can go on and on about what makes WordPress great, but let's stick with its one outstanding benefit: There are so many great ways to integrate Twitter with your WordPress website.

This article will cover various ways to merge your Twitter presence with your website, and thus, maximize opportunities to relate to your web audience.

After all, that’s what really matters: your relationship with your audience. By closely aligning your website and your blog with your presence on Twitter, you’re inviting visitors to take their online relationship with you to the next level. It’s how you build trust online, increase engagement, and if you’re a business, increase the likelihood your audience will buy from you.

Here are six ways to tightly integrate your Twitter presence with your WordPress-powered website and take your online social presence to the next level.

1. Embedded Tweets

An embedded tweet is a single tweet, embedded within any webpage or blog post. This tweet comes packaged with Twitter functionality, including the retweet, reply and favorite buttons, as well as the timestamp. See below for an example of an embedded tweet:

Luckily, WordPress makes this incredibly easy to do. Simply paste the URL of that tweet within the body of any page or post, and WordPress takes care of the rest.

2. Twitter Follow Button

If you’re very active on Twitter and want to align your website audience with your Twitter followers, you’ll want to make it easy for your website visitors to follow you on Twitter.

Include a Twitter follow button on your website. Unlike a simple, linked Twitter icon, the Twitter follow button allows visitors to follow you on Twitter with one click, without having to leave your website.

The Twitter follow button should be displayed on your website “globally,” which means it should be visible in the same place on every page of your website. I’d recommend placing it in the header or footer of your website.

Twitter provides a very easy tool to generate the embed code for the Twitter follow button. It even gives you several options, such as button size and display text.

You can paste that embed code in any website. If you’re able to edit your WordPress theme files, you can place this in the header.php or footer.php file.

But not everybody is comfortable with editing code and modifying his WordPress theme. Luckily, several plugins make it easy to embed a Twitter follow button without touching any code.

3. Tweet Button

The tweet button very effectively helps spread your content. When your blog post, article, video or podcast resonates with a visitor, the tweet button gives her a quick way to spread that piece of content to others.

Like the Twitter follow button, you can use Twitter’s easy tool to generate the embed code for a tweet button, which you can then place on each of your article pages.

When adding the tweet button to a WordPress website, you’ll want to add the code to in the appropriate location within your themes single.php file. This is the template file that controls all your blog post pages.

But once again, if you’re not comfortable with editing code, several WordPress plugins can add a tweet button for you:

One additional tool that I find particularly useful is Click to Tweet. This makes it easy to generate a text link that triggers a tweet pre-populated with the 140-character text of your choosing. You can then place that link anywhere in your articles and pages.

4. Tweets Timeline Widget

Use your website to attract more Twitter followers by showcasing your recent Twitter activity in the sidebar of your website. This gives your visitors a glimpse into what you’ve been tweeting about in the last day or so.

It’s a great way to keep your website fresh with new content, even during periods when you’re not publishing new blog posts. But more importantly, it gives visitors a taste of the types of things you commonly tweet about. If your tweets consistently provide value and stay on-topic (relevant to your audience, your business, your industry, etc.), then it makes sense to spotlight them on your website.

First, let’s look at how to generate one using an official Twitter timeline widget. Log in to your Twitter account, then go to "Settings" and click on “Widgets.” Here you can create a new widget that displays a timeline of your recent tweets, along with a built-in follow button.

When placing this on a WordPress website, you’ll probably want to edit the sidebar.php file in your theme. That file often controls the sidebar shown on all pages of your website.

But for those lacking dev skills, it’s best to stick with easier solutions, like plugins. Here are a few WordPress plugins that make it easy to add a Twitter timeline widget to your website sidebar: