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.

Installation

  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.

Comments

Just to let you know that this works on WP 2.3.1 . . . any way to get the URLs to link?

If it also could handle long URLs so they didn’t go out of the margin in my sidebar, like wrap them around, this plug in would be brilliant.

Thanks!

Works for me on 2.4-bleeding (latest Subversion checkout). Just a note–you don’t have to copy the PHP file into wp-content/plugins/widgets; just extracting it into the plugins folder made it show up in the admin interface, and I was able to add it to the sidebar from there.

Thanks for the compatability updates guys. Appreciate it.

[...] Plugin Homepage [...]

Is there any way to install this without using widgets? I’m not sure what the code is supposed to be to insert it into the sidebar.php

If you want to edit sidebar.php yourself you can get the HTML from Twitter’s “badges” page at http://twitter.com/badges/html

[...] le plugin wordpress qui balance mes 5 derniers feeds sur mon [...]

[...] Wordpress Twitter Widget bindet die Kurzmeldungen direkt in eine Wordpress-Seite [...]

[...] Twitter Widget ????????Widget?????Tweet??? [...]

It also works on 2.5 by the way. Nice plugin :)

Thanks Ray.

I’ll have to upgrade now ;)

hi. Thanks for plugin

perfect.

regards

[...] winner is the cleverly named Twitter Widget.  It doesn’t allow you to update your twitter status, but upon reflection I realized I [...]

[...] use “Twitter Widget” by Sean Spalding for my needs and things seem to work great. There are instructions at the site as well as files for [...]

[...] Twitter Widget – Integra las últimas actualizaciones de twitter en la barra lateral. [...]

[...] Twitter Widget ????????Widget?????Tweet??? [...]

Sean,

The widget isn’t currently working. Would it have to do with the Twitter API?

Yes, the widget relies on the API being available. Note, however, that javascript must also be enabled on your browser.

[...] 3?Twitter Widget [...]

Great widget, thanks!!
Supereasy to install….

[...] Twitter Widget ????????Widget?????Tweet??? [...]

[...] Twitter Widget – Adds a sidebar widget to display Twitter updates (uses the Javascript Twitter ‘badge’) [...]

[...] Twitter Widget [...]

[...] Another WordPress Twitter Widget [...]

[...] Another WordPress Twitter Widget [...]

[...] Twitter Widget ????????Widget?????Tweet??? [...]

[...] Connect Wordpress Plugin from Sociable! and modified it slightly. I have also installed the Wordpress Twitter widget (more on that [...]

[...] I have three new plugins to Data-stitches that readers may find useful.  First, I added a twitter widget that allows user to see my last 5 tweets on twitter.  I uploaded it to Senna, activated it and [...]

[...] WordPress Twitter Widget von Sean Spalding nutzt Twitter’s Javascript Badge und zeigt einige Daten des Twitter Kontos an. [...]

Hey there,

Thanks for the plugin.

Can you tell me how to customize the look and feel of this widget, i want to change the li details of this.

You can customize the addon by adding CSS to your theme’s CSS.

The content is built with javascript so to view the generated code you can use either Firefox’s “Web Developer” toolbar function “View Generated Source” or the Mouseover DOM Inspector.

[...] have "Twitter Widget" and "Twitter updater w/ TinyURL" running right [...]

[...] Twitter Widget ????????Widget?????Tweet??? [...]

[...] 2) Twitter Widget at http://seanys.com/2007/10/12/twitter-wordpress-widget/ [...]

Hi Sean,
Current Twitter link for html badges is:
twitter.com/widgets/html_widget

Best wishes, Mitch

Thanks Mitch.

Maybe updating the link in the docs will prompt me to complete the changes to the widget I’ve been working on for ages ;)

[...] De tagsphere heet wp-cumulus (plugin), de twitterfeed (ook een plugin) heet – heel origineel – Twitter Wordpress Widget. Het ‘Talk to me on MSN’-linkje kan je hier maken, de luchtwallpaper heb ik ooit eens [...]

Hi Sean. Thanks for the widget. We are getting an error “Undeclared entity warning at line 275, column 1″ when we add the widget. When we remove the twitter widget, it disappears. Any ideas what the problem may be?

[...] Twitter Widget Pro – v1.0.3 [...]

[...] I have also installed the twitter widget. [...]

What a great simple plug perfect!

Is there a way to put the widget is several sidebars? The add button disappears when added to a sidebar.

Not as far as I know. But then again, my blog design only has one sidebar.

If you copy the HTML that is generated by the javascript you can place that HTML anywhere and you’ll end up with two badges. You need something like Web Developer toolbar for Firefox to view generated source.

[...] twitter has a nice little widget with wordpress that I can use to update my Facebook status and my site at the same time. So now you [...]

I like your Twitter Widget plugin, but it ‘delay’ the rendering of my page. I have a sugestion. Could you put the ’scripts’ at the end of the body? If you want i can send to you my own modifications.

[...] unter: Seanys.com. Dieses Widget ist bei den Blogs auf Wordpress.com automatisch installiert – bei [...]

Thanks great Plugin.
Thanks for sharing.
Joachim

[...] ?? ?????? ?????, ????? ??? ?????? ????? ????? badge. ?????? ????? ????? ?????? ???? HTML/JS ???????? ?????? [...]

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=""> <strike> <strong>

(required)

(required, never displayed)