Just another bunch of stuff pouring out of some guy's head

WordPress Twitter widget

I’ve been wanting to dip my foot into WordPress widgets for while so when I noticed Twitter didn’t have a WordPress widget I decided to write one. Of course, I’m not the first.

The widget makes use of Twitter’s Javascript ‘badge’. It’s not sophisticated and there’s only 3 configuration options: Twitter account name, widget title and number of updates you want shown.

It saves you having to paste the code into your page and gives you a nice interface for changing the display options.


  1. Download the WordPress Twitter widget from WordPress.org.
  2. Unzip the downloaded file and upload/copy ‘twitter-widget.php‘ to your ‘/wp-content/plugins/widgets/‘ folder.
  3. Activate the ‘Twitter‘ plugin in your WordPress’ Plugins admin.
  4. Drag the ‘Twitter‘ widget to the sidebar in your WordPress’ Widgets admin.
  5. Configure the widget with your Twitter account name, widget title and number of updates you want shown.
  6. Save Changes and you’re done!

Thanks go to Mike Jolley for his handy widget tutorial.

Update – 2007-12-19

The widget is now hosted on WordPress.org. Thanks guys.

Also gotta send some love to the guys (and girls) that write Subversion, Aptana and Subclipse.


[…] Adds a sidebar widget to display Twitter updates (uses the Javascript Twitter 'badge') Version 1.0.3 | By Sean Spalding | Visit plugin site […]

I don’t now why, only can put one twitt widget. I need use 5 at least.
What i need change o how can i fix this?

Is it possible to move the ‘XX days/hours ago’ to a new line?
Thank you.

Never mind. I just figured it out myself. Simply add the following to style.css:
.widget span {display:block;}

Anyway thanks for the nice plugin.. Great job!

@Serge Thanks. I’m glad it’s useful for you.

[…] Bayern München […]

Hi Sean,

I believe you are the author of the Twitter Widget. I have a question. My client would like to see both Twitter and FB posts on his websites. I set him up with a ping account that allows him to post on both Twitter and FB at the same time. If I use your widget will it show posts from both apps?
Thanks in advance,
Miriam Freer

@Miriam, the widget only connects to Twitter’s feed.

I understand, but the ping account posts to both FB and Twitter so whatever the client posts, posts both places. So if it connects to Twitter’s feed that’s fine because all FB posts are there as well.


BTW do you have any slide show widgets? Or one that you would recommend? I just want one to show in a side bar samples of my work.
Thanks, the newbie nerd,

@Miriam, try wordpress.org/extend/plugins/ for plugins.

Thank you will do, I’ll let you know how I make out.


Hi Sean, i have one question…
How do call the variable “$widget” to the Twitter widget plugin???
Thanks, Eber

ops example: the_widget(‘What’s name of plugin of here???’);

[…] surely lots of wordpress widgets that allow you to show some twitter posts on you blog, but I found Twitter Widget one of the best of them. You only need to fill in your twitter username and the number of posts […]

HI great widget! But I have just noticed it is not working in Internet Explorer but not in FireFox. Why do you think this is?

@Eber, sorry I’m not sure what you’re asking. What are you trying to do?

@Nikki, perhaps Javascript is either turned off or there is a Javascript incompatability. Or maybe it’s being blocked by an AdBlocker. Works in both FF3.6 and IE9 for me.

Thanks guys for share.i like this plugin 🙂

Excelent plugin, I will try it now

Is there a way to add a second Twitter feed? On our show, both hosts have a Twitter account, and once I add one host’s feed to the sidebar, the widget disappears from the available widgets. I appreciate your response in advance. RB


[…]WordPress Twitter widget | seanys.com[…]…

[…] Twitter Widget by Sean Spalding […]


Is there any way to change the twitter widget plugin to say “1 week”, rather than “1 weeks”?

I look forward to hearing from you


No Dom, there isn’t. The tweet code is pulled from Twitter and not part of the widget.

Leave a comment

Line and paragraph breaks automatic, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


(required, never displayed)

Before you please complete the CAPTCHA below.

Time limit is exhausted. Please reload the CAPTCHA.

Sorry about the CAPTCHA but the SPAM was killing the site. I get thousands a day.