So we need a new term to describe widgets

There’s been an interesting discussion on Justin Tadlock’s blog about replacing “sidebar” in WordPress. It originally spawned 10 months ago by Ian Stewart, but no progress has been made. It seems as if Justin already choose what he feels is correct for his Hybrid theme, but whatever that is, he’ll probably have to change it anyway. WordPress 2.8 is just around the corner and one of it’s primary feats is to revamp wp-admin/widgets.php.

I’m sure the revamp of the widgets management page has been given a lot of thought by WordPress core developers and Matt M. himself. I think that if we were to deprecate get_sidebar and the term Sidebar, Matt would have the best opinion on that matter. Simply because he understands both the end-user and developer perspective and he sees the bigger picture. So I’m all ears for hearing what he has to say about all this jazz.

My final opinion on this matter aligns somewhat with Lorelle, “Call them WordPress Widgets and announce that they have broken the sidebar barrier.”

get_sidebar shouldn’t be deprecated as a whole as it still could serve it’s purpose. What probably needs to be deprecated is get_sidebar’s parameters and how widgets are branded.

For the first problem, move get_sidebar’s parameters on over to a new function called get_widget(); and call it a day. get_sidebar will still be able to call sidebar.php and WordPress 2.8 won’t cause a pandemonium break out when theme authors have to update all their themes. Here, I’ll show you how you could add this new function to your own theme, right now:

function get_widget( $name = null ) {
	do_action( 'get_widget' );

	if ( file_exists( get_stylesheet_directory() . "/{$name}.php" ) )
		locate_template( get_stylesheet_directory() . "/{$name}.php" );
	else
 		echo "Sorry, but {$name} does not exist. Please make sure this widget exist in " . get_stylesheet_directory() . "";
}

What this function does is check to see whether a widget exist by the name of $name, which you define like so: get_widget( 'the_content' );. If it does exist, load it in the WordPress environment and include that widget. If it doesn’t exist, throw out a helpful error message. Add that to your functions.php and you’re all set. So instead of having sidebar-widgetname.php, you could just have widgetname.php.

Then there’s still the wp-admin/widgets.php problem. Again, that’ll require someone who understands both the end-user and developer perspective, I’m too baised towards the latter so my opinion isn’t justifiable for everyone.

44 Other Comments

49 Comments

  1. February 25th, 2009 at 3:13 am | Permalink

    I haven’t made up my mind just yet. I was hoping to hear something from someone a bit more “official,” but none of the WP.org developers chimed in.

    Personally, I wouldn’t name a function that gets a widget area get_widget. It sounds like you’re only grabbing one widget instead of an entire set of widgets. Maybe just append an “s” on the end, at least.

    While it would be neat to get some new terminology, maybe we don’t even need it. WP 2.7 introduced the locate_template function, which gives plenty of control over templates. Maybe it’s best if theme developers are left to come up with their own terminology.

  2. February 25th, 2009 at 6:12 pm | Permalink

    The term get_sidebar should definitely stay. They function calls up a particular template, which is intended for sidebars. It has nothing to do with the issue over widgets, it just coincidentally happens to often be used for displaying widgets.

    • February 25th, 2009 at 7:43 pm | Permalink

      Ryan, I definitely agree that get_sidebar() should stay. It’s perfect for including sidebars.

      I think the biggest issue is just breaking out of the mindset that widgets only go in sidebars.

  3. February 25th, 2009 at 10:49 pm | Permalink

    One step closer to WordPress as a CMS. I think it would be a very useful feature.

    This comment was originally posted on http://wpcandy.com/)“>WPCandy – The Best of WordPress

  4. Gustaf Jarnling (gjarnling)'s Avatar Gustaf Jarnling (gjarnling)
    February 26th, 2009 at 12:31 am | Permalink

    Very useful. Would streamline the code more. As of now one sometimes call the widget via the sidebar and sometimes through the code; i.e. using a widget in the footer. This is a great suggestion!

    This comment was originally posted on http://wpcandy.com/)“>WPCandy – The Best of WordPress

  5. February 26th, 2009 at 8:12 am | Permalink

    And some people say Wordpress is rather limited!

    I think this is a great suggestion and should sped up the loading the of the page.

    This comment was originally posted on http://wpcandy.com/)“>WPCandy – The Best of WordPress

  6. February 26th, 2009 at 1:20 pm | Permalink

    That would be a great addition to the code base.

    This comment was originally posted on http://wpcandy.com/)“>WPCandy – The Best of WordPress

  7. February 27th, 2009 at 9:41 am | Permalink

    Nice list. You need to add me as well, just list me as the “most awesomest WordPress theme developer in the world.”

    kthxbai

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  8. February 27th, 2009 at 10:03 am | Permalink

    Amazing list. Thanks for the share.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  9. February 27th, 2009 at 10:14 am | Permalink

    Awesome list. Definitely a list of WP rock stars. Really dig how you added both blogs, and twitter feeds if applicable.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  10. February 27th, 2009 at 10:26 am | Permalink

    I submitted this to digg:
    http://digg.com/software/50_People_in_WordPress_That_You_Should_Be_Following

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  11. February 27th, 2009 at 10:50 am | Permalink

    Ryan I’m just a lowly wordpress user but I love the list. I’ve benefited from the work of well over half the hard working (and brilliant) people on this list. It’s great to see who they are and be able to better connect with them.

    Great Resource thanks:
    (Now I’m off to add lots new blogs to my reader)

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  12. February 27th, 2009 at 11:20 am | Permalink

    Thanks for the list And a very nice list it is

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  13. February 27th, 2009 at 1:33 pm | Permalink

    Whoa!! I have lost the count on how many links I clicked here. Thanks Ryan!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  14. Dev's Avatar Dev
    February 27th, 2009 at 1:45 pm | Permalink

    this is great.. thanks for the good post.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  15. February 27th, 2009 at 4:13 pm | Permalink

    [...] that little smiley face is up there on the right, I discovered this post about who to follow on WP: Who’s Who. The first like 20 people are developers of WP and related sites, widgets, themes, etc. Honestly, I [...]

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  16. February 27th, 2009 at 5:42 pm | Permalink

    Great post, the best of the best in WordPress, this list is a must read!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  17. February 27th, 2009 at 5:59 pm | Permalink

    Thanks for featuring me in this list! If you want I can give you a line or two more info about myself

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  18. February 27th, 2009 at 6:02 pm | Permalink

    That would be great! I would have had something more, but I try to just shut up when I don’t have anything to say, you know?

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  19. February 27th, 2009 at 6:44 pm | Permalink

    I’m so happy to have made the list. I will definitely be sending some link love your way. If anyone was interested in one of my upcoming project launches, please sign up at ThemeSmith and get in on some beta testing.

    Thanks once again on the great post. You really hit the nail on the head. Will check in later this week for more comments.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  20. February 27th, 2009 at 6:53 pm | Permalink

    Thanks! And I went ahead and added your link to ThemeSmith up under your listing. You’ll have to let me know when ThemeSmith launches, I’d be happy to feature it (whatever it is ) once it’s ready to roll.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  21. February 27th, 2009 at 7:52 pm | Permalink

    Hello! It’s nice to be in this list among other great contributors to WP throughout the times!
    However, while I am indeed a web developer, I work for Skyrock in France, not for Automattic.
    (Though I would consider an offer. *wink wink*)
    (And I really have to bring my english-speaking weblog back from the dead, as nowadays all my writings are in french…)

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  22. February 27th, 2009 at 7:58 pm | Permalink

    Thanks, Michel! I updated the post to include you in the Community, rather than the Core. Whoops. I knew something like that was bound to happen with a list this big. Thanks for letting me know before the egg sat on my face too long.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  23. February 28th, 2009 at 9:06 am | Permalink

    Great list indeed. I actually subscribed to about 80% of this list already, but I’m glad I found the remaining 20% here.. well, ’till you do a follow-up post with the remaining 50

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  24. February 28th, 2009 at 11:06 am | Permalink

    Great list, and thanks for the mention Ryan. Would have responded sooner but have been out of town. Also, I can get you a more flattering headshot if you want

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  25. February 28th, 2009 at 11:15 am | Permalink

    Yeah, that would be great if you want to send it over!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  26. March 2nd, 2009 at 4:30 am | Permalink

    Very good list of developer list, l should fallow each of them adding them now. bookmarked. thanks.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  27. March 2nd, 2009 at 9:43 am | Permalink

    A great list, thanks for sharing!!!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  28. Gerrica's Avatar Gerrica
    March 2nd, 2009 at 9:01 pm | Permalink

    Oh dear, you forgot to mention any of the moderators over at the WordPress forum – especially our beloved moshu, who really helps keep the community together!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  29. March 2nd, 2009 at 9:23 pm | Permalink

    Great list of people to follow to get tips for Wordpress!

    I’m sure I’ll be learning a lot from these Tweeples!

    Thanks,
    Douglas Wade

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  30. March 2nd, 2009 at 10:11 pm | Permalink

    Great list. Adding most of them on Twitter too as we work a lot with Wordpress too

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  31. March 3rd, 2009 at 1:56 am | Permalink

    Wow! Huge list of cool people. Added a bunch of them to twitter. Thanks.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  32. March 3rd, 2009 at 2:03 am | Permalink

    This has to be one of the best lists around. Not only it covers employees at automattic, it also features those people have contributed in the community.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  33. March 3rd, 2009 at 8:07 am | Permalink

    This one clearly portrays the essence of web. Sharing & Colloboration.

    A great piece to be shown to people who say, web is all business and mechanical with no personal/emotional touch/aspect to things !

    Could you tell how to get a biggie-biggie comment form like this ?
    Will simple edits to comments.php do the thing ?!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  34. March 3rd, 2009 at 11:41 am | Permalink

    Sure, Aravind. It’s all about the CSS, really. If you have experience with CSS, you’re just going to increase the font size, line height, padding, and height of your inputs and textareas to get this effect.

    Let me know if you’re successful or not.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  35. March 4th, 2009 at 12:32 am | Permalink

    This list should have been called the 50+ MEN you should be following… my finger hurts from frantically scrolling until I found a woman on the list, LOL…. just teasing you, I always gotta represent! Good stuff.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  36. March 4th, 2009 at 12:35 am | Permalink

    Ha, good point Jenny. I was definitely conscious of that fact while putting the list together, and made sure to find a few women for the list. If you run across any that are missed, definitely let me know. We could always use a few more women involved in WordPress development!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  37. March 4th, 2009 at 2:58 am | Permalink

    Thanks. I’ll try that out.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  38. March 4th, 2009 at 3:01 am | Permalink

    The big thing about the list is that, the people who are featured weren’t slammed with a title “Kings/Mavens/Rockstars/Experts/Celebrities”, rather, employed a humane approach and is exactly what makes this one special. !

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  39. March 4th, 2009 at 3:05 am | Permalink

    Thanks for saying that, Aravind. I’ve never really been a fan of the “celebrity/rockstar” label when it comes to web design/development, on all levels. I think it’s awesome enough that we are building the web, why sugarcoat it with a reference to a musicians? I’m cool enough, thank you.

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  40. March 4th, 2009 at 3:08 am | Permalink

    :)

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  41. March 9th, 2009 at 11:03 am | Permalink

    I wish someday I would be named in a list like that. But more importantly, this list has brought out lot of sites i missed in my Feed Reader. Thanks

    Regards
    TJ

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  42. March 13th, 2009 at 1:22 pm | Permalink

    Hey. Wish to get on a list like this in the future. BTW about the podcast, I’m interested, contact me pls on email or @kovshenin Thanks!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  43. March 17th, 2009 at 11:00 am | Permalink

    Maybe it would have been easier to include more women if you waived the requirement for their full (real) name and photo? Post-Kathy Sierra I can’t be the only one being cautious about the degree of personal information I splash over the internet.

    There are women doing good work in the theme arena (e.g. Elena @ Design Disease, Lisa Klicko @ Lorelei) but they tend to focus on marketing the product rather than themselves and hence get overlooked. (True, they don’t blog about WP, but then neither do many of the other people on this list.)

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  44. March 17th, 2009 at 8:59 pm | Permalink

    Schweet!
    I went through a similar list a while back … created 2 Netvibe tabs, one via Yahoo!Pipes for posts from Automattic (a href=”http://bentrem.sycks.net/automatticpipe_js.html”>raw output) and another for WP blogs (a href=”http://bentrem.sycks.net/wordpresspipe_js.html”>raw) … time for a comprehensive update!

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

  45. March 21st, 2009 at 7:02 pm | Permalink

    I’m 100% up for the change. Semantic value to the code always make me happy.

    @Dean, how would it speed up the loading of the page? If the change happens, wordpress will RENAME the function get_sidebar() to get_widget() unless they make changes to the code to improve the perfomance of the wdgets.

    This comment was originally posted on http://wpcandy.com/)“>WPCandy – The Best of WordPress

  46. March 21st, 2009 at 8:09 pm | Permalink

    This is the list to be in! Someday, I’ll make it. Enjoying your posts so far Ryan. Keep up the good stuff. Also, if you don’t mind – I’m fell in love with your comments form. Mind if I copy it for my redesign?

    This comment was originally posted on http://www.themeplayground.com/)“>Theme Playground

Additional comments powered by BackType

About Ptah

I’m a 21 year old web developer, entrepreneur, and founder of Design by Craftsmen, web creative studio specializing in custom WordPress solutions. Get to know me.

Twitter