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:
register_sidebar(array(
'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.
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.
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.
Example:
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: