WordPress fan and developer Jesse Friedman thinks it's time to update how widgets work. On his website, he explains sidebars and widgets are not semantic, because they are often just widget holders in a site's header, footer or an aside; additionally, sidebars are theme-dependant, meaning when you change themes, sidebars and widgets can be lost.
Friedman's suggestion is to rework widgets using a system similar to menus in WordPress 3.0: a user would define widget holders, fill them with widgets and then order them however they like. Theme developers would then define widget holder locations to house widget holders, thereby separating widgets from the theme.
We spoke to Friedman, to find out what the thinking was behind his proposal and how WordPress sidebars ended up how they did.
.net: Why did you write the post?
JF: I have been developing WordPress websites for nearly six years, and about three years ago, I started doing only WordPress-powered websites. Although WordPress is my favourite CMS, it has room for improvement. The Widgets and Sidebar section of the WordPress admin has flaws: the term 'sidebar' isn't semantic, because we can put them anywhere, and sidebars aren't theme independent.
.net: So what is your main concern with the way widgets currently work?
JF: When you add a widget to your site, you're actually placing it into a sidebar. The problem is widgets and sidebars are not theme independent. This means your theme defines the sidebars and if you change themes you likely lose your widgets.
.net: With modularity being one of the key benefits of blogging systems, do you find it odd that widgets require so much work if you change themes?
JF: WordPress Core Developers and the community strive to keep WordPress light but also scalable. There are many key functionalities that are not 'turned on' until the theme you activate does so. This includes widgets, menus, backgrounds and more. In the past, widgets and sidebars were typically showcasing something like the 'ten most recent posts' in the left- or right-hand narrow column of your theme.
Today, widgets can be anything from Facebook 'Like' buttons to photo galleries and placed in the header, footer or anywhere else. I think this has been an issue for a while and hasn't been necessarily neglected but rather waiting for the ideal solution to arrive.
.net: Why do you think the system ended up as it did?
JF: WordPress developers and designers pushed the system a bit. We had a problem and widgets became the solution. Now, theme developers have found better and more scalable solutions for widgets and build them into every facet of the theme. This gives user admins more control of dynamic content through a nice UI. The problem is, WordPress hasn't caught up with what we've made it into. That's okay, but now it's time for an elegant solution.
.net: Do you perceive any resistance to change within the WordPress community when it comes to things like this, or do you think it's possible a better system might soon appear?
JF: I perceive a healthy debate and look forward to it. I proposed a solution to the problem because my experience and knowledge lead me to believe it's the right answer. However, if someone else recommended something better, I'd be the first one to embrace it. I think we are all working to make WordPress better.