** Update July 12, 2013 **
I’ve updated this plugin to work with the new authenticated Twitter API. Huge shout out to MatthewRuddy, author of Display Tweets. His code really helped me to get this working.
If you’re not running at least version 1.2.1, go get the update!
So I finally got around to officially releasing my first WordPress plugins. The first one, which I’ve actually been using for a long time on sites I build, is GG Twitter. The issue that I was having with off-the-shelf Twitter plugins was that they would just display an error message when they couldn’t connect to Twitter. So mine stores the last known good tweet retrieval and displays that if a connection error occurs. Mini-caching if you will.
I’ve also added various options to it that I haven’t seen in other Twitter widgets (though, really, I haven’t looked at that many of them). So let me explain them in a little more detail.
Admin configuration screenshot for Grinning Gecko Twitter Widget.
Title: This should be pretty self-explanatory. The title that appears at the top of the widget.
Twitter Username: Also pretty self-explanatory. No `@` necessary.
Max Tweets to Display: I’m noticing a trend here. Self-explanatory. How many tweets do you want to show in the list?
HTML for the View All Link: This is the HTML (or just text) that will appear at the bottom of the tweet list linking to your Twitter page. By default it just says “View All Tweets”.
Time Placement: Lets you display the time of the tweet before or after the tweet itself.
Time Format: Lets you format the timestamp any way you want, assuming you can decipher the PHP: date reference page. The default format is Tue Nov 6th (as an example). Putting something like `l, F jS @ g:i a` would display Tuesday, November 6th @ 1:30 pm.
Title Links To: That’s the second plugin I just released. More on that later.
I also wrap pretty much every element in its own class, so styling is easy without any hackery.
Download GG Twitter from WordPress.org
Fork GG Twitter on BitBucket