Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

There are (among others) two common ways of customizing the sidebar on an individual post:

  1. Create a new sidebar for the post, using code or plugins like Custom sidebars, WP Custom Sidebar, Per Page Sidebars, or similar.

  2. Create conditional display rules on individual widgets, using plugins like Widget Logic or Conditional Widgets.

Option 1 can lead to a proliferation of sidebars on your Widgets page if you have more than a few posts you want to customize. Option 2 can quickly lead to long, complicated, and difficult-to-manage sidebars in the backend. And with both 1 and 2, the user has to manage things on a separate page than the page she wants to customize.

So:

Are there any plugins—or related attempts—to add a sidebar/widget editor, (like in Appearance » Widgets) to the post edit screen? The idea would be to give the user the option to override the default sidebar on a given page in a convenient and intuitive way.

It might work something like this:

  • Add a metabox containing a checkbox to override default sidebar on that post or page.
  • If checked, display interface to select widgets. (this could be the full widget 'bank', but, more economically, it could just be a dropdown with names of widgets).
  • For the interface and saving, recycle code from Appearance » Widgets
  • For front of site, include filter to replace the default sidebar if _override_sidebar meta field says so.

I'm surprised I can't seem to find a plugin for this. Do you have suggestions—plugins, pitfalls, related code?

enter image description here

share|improve this question
    
Has a solution been found to this at all? This makes eminent sense - and would love to see the option to manage widgets from the page / post that it's related to. –  user15588 Apr 27 '12 at 1:58
    
Not yet, unfortunately. Note for the future—we're meant to post replies that aren't answers in the comments section of the question (use the Add comment link.) –  supertrue Apr 27 '12 at 5:57

2 Answers 2

I'm sure there is a more elegant approach (I'd love to know about!). Anyhow: I'd like to offer a solution. You could create a default sidebar with default widgets and a custom sidebar with all available custom widgets. Then you use a combination of the following plugins: simple fields and widget logic to only show a selection of widgets.

How to:

  1. Fill the default sidebar, add a condition that shows this sidebar only if a certain metadata value is NOT set.
  2. Fill the custom sidebar with all optional widgets, add a condition to every widget to show up only if a certain metadata field is available
  3. Set up simple fields to write the conditional metadata

This way works quite well for me, though it is not very pretty.

Hope it helps or gives ideas for further extension.

share|improve this answer
    
Very good idea +1! Not sure if you doing this, but I think of: a repeatable field with a dropdown that contains a list of the available widgets. Would be nice if you expanded about the condition you apply to all widgets. I imagine is a custom function... –  brasofilo Jul 16 '12 at 21:46

Looks like someone's working on that :)

Buckets - Widgets alternative

I built it mostly because I wasn't satisfied with the way wordpress handles Widgets. I'm use to other CMS's that allow it to be more customized. On top of that I need it to be easy enough for clients to use.
http://support.advancedcustomfields.com/discussion/1660/buckets-widgets-alternative

There's a beta version for download in the thread.


[Update]

It is an official plugin in the Repo now:
http://wordpress.org/extend/plugins/buckets/

This plugin is designed as a widgets alternative. However it's uses can be expanded beyond that. It works ok on it's own, but really flys when paired with the Advanced Custom Fields plugin.

share|improve this answer
2  
Please note, this plugin is using function names designed to break, like admin_head() or init(). –  toscho Nov 25 '12 at 17:50
    
@toscho : thanks for the follow up. Didn't actually test the plugin :/ ..... How would that pass the plugin approval¿? I pinged the author about it. –  brasofilo Nov 25 '12 at 19:10
    
I was wondering the same. The plugin check is not public, so I can’t say how that worked. –  toscho Nov 25 '12 at 19:25
3  
Buckets author here. Thanks for the feedback about the function names. I actually did rename them in the newest version but have not pushed out the changes yet. It's my first plugin so I'm learning from other plugins I see as I go. I had no idea people were using it really, I will try to get some documentation up as soon as possible. In the mean time if you have any questions please feel free to contact me directly. mrestorff@gmail.com –  paper_robots Nov 25 '12 at 19:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.