I’m not a big fan of newspapers. Planets will line dance before I read more than a handful of column inches in any given rag. One of my beefs with print media is that I can’t customize it. Sure, I can tear up a newspaper and shuffle the parts around on my kitchen table but the parts never fit together again.
Enter WordPress Widgets. A few hours ago, Matt launched this little feature that we designed and I wrote. This may not be a time for comparing small steps to giant leaps but it’s still pretty cool. Widgets are sidebar elements that you can move into or out of, up or down your sidebar any way you like. This sidebar thing is starting to sound like fun!
Matt mentioned that we’re taking requests and opening an API. Of course, not every request can be honored but we’ll try to include the most popular wishes as time goes on. This is part of what’s so nice about having an open API: any programmer can write a widget. It’s really just a mini-plugin.
Programmers: before you get all excited about writing the next big sidebar widget, you should know that the API (which is painfully simple) isn’t done yet. This is mostly due to the differences in sidebar markup between themes. We’re beefing up the API to handle this diversity but rest assured that the API will be very familiar: write a function or two, use a couple of new hooks, stick a fork in it.
February 25, 2006 at 9:39 am |
These widgets are awesome! I just think we need del.icio.us and Flickr widgets!
February 27, 2006 at 8:30 am |
WordPress Widgets
Exciting stuff with the WP.com admin tools… Andy Skelton has developed a widget framework that enables customisation of the sidebar template. I’ve been quite frustrated with the lack of customisation of the little things; specifically how…
March 11, 2006 at 1:02 pm |
I’ve been looking for 10 minutes at all these connected blogs and haven’t seen a widget link yet.
March 12, 2006 at 5:34 am |
[...] There have been a few recent announcements about the WordPress.com Sidebar Widgets lately, especially from WordPress developer, Andy Skelton, and in the WordPress.com Blog, so what is all the fuss about? [...]
March 13, 2006 at 9:46 am |
[...] WP Sidebar Widgets WordPress.com introduced new sidebar widgets and Lorelle has a nice writeup on what they are and how to use them from a users’ perspective. Technorati Tags: wordpress widgets [...]
March 13, 2006 at 11:01 am |
Any chances we can get them in the downloadable version of WP too
I really hope so!
March 13, 2006 at 12:33 pm |
Will the be avalible for the non-wordpress.com blogs ? It would be great !
March 13, 2006 at 7:23 pm |
Andy,
What do I as a theme developer need to do to ensure that I can make an editable sidebar, so that widgets can be used on it?
March 14, 2006 at 1:23 pm |
I second Ajay’s question. And the theme I had probably in mind to do this was Ajay’s too. Hah!
March 14, 2006 at 2:52 pm |
I’m working on a release of the plugin so everyone can see the code, as well as API documentation. It’s really not difficult.
Here is a piece of advice though: make your sidebar one giant unordered list. Don’t use divs. sidebar.php should look like this (pardon the lazy brackets):
[ul id="sidebar"]
[?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?]
{insert non-widget sidebar list items here}
[?php endif; ?]
[/ul]
Then this must go in functions.php:
if ( function_exists(’dynamic_sidebar’) ) :
register_sidebar(1);
endif;
Building your sidebar any other way will force you to do more work to make it work. Creating multiple sidebars is easy, however. You’ll see it in the docs later this week. For a sample, switch to the WP-Andreas-09 theme.
March 14, 2006 at 6:03 pm |
I have the same question as Ajay. I have my own theme and want to make sure it is compatible with sidebar widgets. I also look forward to learning about the API as it settles down. Keep us posted Andy!
-Walter
http://NoNAIS.org
March 14, 2006 at 10:08 pm |
Same complaint as BillyG: I find lots of links talking about widgets, but where are the widgets themselves?
March 30, 2006 at 5:23 am |
[...] Hacía semanas que se venía hablando de los Widgets para WordPress en distintos blogs relacionados con el CMS y de su implementación en el servicio de wordpress.com. [...]
April 30, 2006 at 9:37 am |
[...] Widgets, as sidebar accessories, were written by Andy Skelton, one of the WordPress original developers, based on input from Matt, the Father of WordPress. It’s a great idea: instead of learning PHP, changing sidebar.php, and thus restricting the ability to support the sidebar among different themes, why not have a visual way to drag and drop “widgets” into the sidebar? [...]
October 13, 2006 at 5:31 am |
[...] I also experimented with Widgets. It took me a while to figure out whether Widgets were just for WordPress.com hosted blogs (see sidenote, left) – I could only seem to find old posts on the matter – but eventually I discovered that Widgets are now available for self-hosted WordPress blogs too, with the help of the Automattic plugin. [...]