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
- Download the WordPress Twitter widget from WordPress.org.
- Unzip the downloaded file and upload/copy ‘twitter-widget.php‘ to your ‘/wp-content/plugins/widgets/‘ folder.
- Activate the ‘Twitter‘ plugin in your WordPress’ Plugins admin.
- Drag the ‘Twitter‘ widget to the sidebar in your WordPress’ Widgets admin.
- Configure the widget with your Twitter account name, widget title and number of updates you want shown.
- 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.
Hey Sean, Just grabbed WP Twitter Widget and … so far, so good. One small problem: URL’s that are wider than the box don’t wrap around. I’m looking into how this might be fixed in code and will let you know.
In meantime, check out my blog: http://www.dalecoweb.com/thetroubleshooter.
Cheers, Dale
Hehe, you’re not the first to anguish over URL wrapping. I prefer to use bit.ly.
This link has an interesting answer to the issue.
I activated the widget, but only Sean’s tweets are showing just like above. How do I change this. I know nothing about HTML
Alex
Alex, you have to enter your Twitter username into the widget’s settings.
Hi there,
Nice widget, however I’d like a little bit of space between each tweet posted. Is there a way in either the settings, or exactly what file and what code/where do I need to make the change? I noticed a nice break between the tweets on this page.
There is no styling present in the widget. It takes all the styling from the CSS already present in your WP install. Please see my replies to other comments for help with this.
This is a great widget, however as Twitter is getting more and more popular I’ve noticed that there is a big lag on page load when the widget attempts to contact Twitter. It would be great to see an option to enable a cache, so that the last Tweet could be from a cache rather than a call to the Twitter server.
Once again, thanks for the widget.
Thanks Adam. Certainly Twitter’s performance varies but there are many other WP Twitter plugins and some that do caching. You should investigate those.
I have add twitter plugin in wordpress but i active the plugin there is an error
Thanks for a quick and hassle free widget! Love it.
Thanks for the Widget! Was super easy to install and works great…
Thanks for the comments guys. Glad the widget serves your needs.
The widget code is very simple. If you’re getting an error it’s probably conflicting JavaScript from something else in your site.
My Twitter feed only shows up if I am logged into WordPress. Otherwise it says “No public Twitter messages” Any advice?
Thanks.
Thank you plugin work really fine.
Ich habe das plugin installiert, habe aber Probleme mit den Umlauten, die es ja in der deutschen Sprache gibt. Kann man da was ändern?
Great widget, works great, but I have one issue. What is controlling the color of the text of the actual Twitter post that shows up on the sidebar in your widget. The Widget Title and the time stamp on the twitter post show up fine using the website colors, but the twitter post text does not. It’s a problem becuase it is black (or very dark) and I have it over a dark background. Any way to change the text colors of the Twitter post that is taken from Twitter?
Never mind. Figured it out based on an earlier post. in the CSS, added,
#twitter_div {color:#ffffff;}
Thanks.
Well done.
Hi there,
I successfully use your twitter widget on a blog of my own. However I recently started a new web site which host two domain name with different language content under the same wordpress instance.
If I use your widget, because the widget settings are shared between the domain, I will be able to show only one timeline.
What I want, instead, is displaying a twitter account for the english language and one for the second language.
The only chance I have is to manually plug the widget coding the widget into the sidebar, or eventually add a php variable which will influence the feed retrieving process.
Is this possible? Can you provide me some hints?
Many thanks
Andrea
I’ve been using your twitter widget for a while and thought it was working great until I recently began retweeting often. Retweets don’t seem to show up on the widget, yet they take up a blank space. Is there a fix for this so it will either display retweets or skip them entirely?
Thanks,
Aaron
Aaron, my best guess would be that the CSS of your site is styling the text of the retweets the same colour as the background of the page. Try a “control a” (select all) on that page and see if the retweets appear when reversed out.
I’m following a bunch of different news sources in Twitter. Is there a way to use this plugin on my blog to display the news feed from these sources? I’m not posting any updates myself yet.
@Brian: No. It only shows your tweets.
the widget seems to not work since i upgraded – any idea if there is a fix?
@joey, I can confirm that it works on 3.0.1. What version of WP are your running?
Is it possible to have the plugin function on certain pages, and not on others?
@steve, it might be but this would be a function of WordPress, ie. different layouts for different pages. I have no idea if WP can even do that.
Hey. This looks great. Can you help me figure out why the words get cut off on my site? Thanks.
Hi guys,
Great widget. But I am throwing IP away. After the tweets fall off, they are gone? Is there a way to ensure they all go into categories to be enjoyed forever and ever? Thanks. Bill
@Chip, not sure what you’re referring to. Example?
@bill. The widget doesn’t “keep” anything so it’s not possible for it to “throw away” anything. It’s merely a view of Twitter, provided by Twitter.
I would like to add the twitter logo which when clicked goes to my profile, how can I do this mate?
By the way this is a kick-ass widget, just what I was looking for!
@Chris, Thanks, glad it works for you. The code of the widget is generated by Twitter’s javascript so inserting an element into it is tricky. You could probably add the Twitter logo with CSS but not the link.
Hi,
I’m wondering if you know how to implement hover cards for this code. I have hovercards for my site entries and it looks a bit inconsistent if I don’t have them in the twitter box.
Thanks,
EB
@Elizabeth, sorry, I don’t. The closest I’ve gotten to Javascript development is copy-and-pasting “history.go(-1)“.
Hi, thanx for your plugin,
I have more than 1 sidebar, and I wold to put the twitter widget in all, but I have just 1 to put..do you know how can I do?