Add the sidebar/widget editor to the post edit screen?

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.

    Read More
  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

Related posts

Leave a Reply

3 comments

  1. 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.

  2. Looks like someone’s working on that 🙂

    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.

  3. Two plugins that may be what you’re looking for:

    • WP Page Widget – customize the whole sidebar in the page/post edit screen, adding a widget for example just for that post.
    • My snippets – a simple widget whose content you can edit in the page/post edit screen. Can contain shortcode/HTML.