WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On some of my pages (not posts) in my Wordpress site, I need to include a sidebar that display s information relevant to the main content of the page the user is on. I can choose, using Edit Page in WP Admin, the page template I want to use for my page. This template includes the sidebar. No problems here.

My question is: the sidebar content will vary page by page, so how do I make the sidebar content dynamic? I don't want to change the html in the sidebar template because that would reflect on all pages using the sidebar, so I can't put my page-specific content there. And, I don't want to create a million different sidebar templates with html content hard coded in to the template. My sidebar template contains the "shell" for the positioning, colors, font, etc. I just want to have a way to change the content in the sidebar on a page by page basis, without that change reflecting on any other page.

It would be great if the Page editor would include a separate content input area for sidebar content.

Is this possible, and is my question clear?

share|improve this question
up vote 0 down vote accepted

There are quite a few ways to do this, here are a couple:

  1. Use a plugin to control which Widgets display on which Pages/Sections. This is a plugin I've used which works well. It adds a "hide/show on...." checklist to each widget where you can select where the widget will display. Works great, but if you have a site with tons of pages and page-specific widget content it can be a bit confusing to maintain. http://wordpress.org/extend/plugins/display-widgets/
  2. Either hand-code or use a plugin to add page-specific custom fields which you then display in the sidebar. The combo of "Advanced Custom Fields" and "Advanced Custom Fields Widget" works well here. You can add any kind of custom field panel (WYSIWYG editor, image upload, radio/select, etc) to the Page editor. Then put one Widget into the sidebar, and have it display that content on a per-page basis. This is probably the cleanest way to go IMO: http://wordpress.org/extend/plugins/advanced-custom-fields/ http://wordpress.org/extend/plugins/advanced-custom-field-widget/

Best of luck, hope this helps!

share|improve this answer
Thanks for detailed explanation; I will check in to this! – Mark Bubel Jun 11 '12 at 16:31

Your Answer


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.