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

i am wondering how i go about making a Template for some of my pages to use a different sidebar? I have created the widget like this:

    'id' => 'ourPat-sidebar',
    'name' => 'ourPat Sidebar',
    'before_widget' => '<div class="widget %2$s" id="%1$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'

In side my Functions.php code.

Then i go into my Widget panel and its displayed just fine. Then i proceed to add text to it in order to form the sidebar html.

widget menu

However, when i go to my Page menu and create a new page, i do not have the choice to use the custom widget code?


So i must be doing something incorrect since its not in there.

To recap, i'm just looking for a way for different pages of mine to use a different sidebar using a custom widget i made.

share|improve this question
up vote 1 down vote accepted

In order to accomplish this you will need to also create a separate page template to use. You may need to double check your template head information.


  * Template Name: Your Template name

This has to be put at the top of the page template. Then within the custom page template you will need to call the custom sidebar that you have.

You will need to put this in the template where you want your sidebar to go:

if ! dynamic_sidebar( 'ourPat Sidebar' ) ) :
    You need to add widgets for items to show in this area. To add for this area add widgets to "ourPat Sidebar".
share|improve this answer
Awesome! Thanks for the help there, Nicole! – StealthRT Nov 27 '12 at 20:33
No problem. Glad to have been able to help. :) – Nicole Nov 27 '12 at 21:56

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.