One of our OSTraining members asked us how they could show different widgets on different WordPress pages. This isn't a feature that's available by default in WordPress.
We recommended this Custom Sidebars plugin, which makes it easy to customize which pages your widgets appear on.
In this short tutorial, we'll show you how to use Custom Sidebars.
Upload and install
- In your admin area, go to Plugins > Add New.
- In the Search field type "Custom Sidebars" and click Search Pugins.
- Find Custom Sidebars > click Install Now.
- Activate the plugin.
Create a custom sidebar
Creating a new sidebar means you will have a container with its own set of widgets.
- Go to Appearance > Widgets > Create a new Sidebar.
- Set a name.
- Click create sidebar
The image below shows how the widgets page looks right now. On the left, your new custom sidebars is waiting. On the right, you'll see the default widget areas from the theme you're using.
Instead of adding widgets in the default theme sidebars, let's add widgets to our new sidebar. Drag-and-drop one of the widgets into your custom sidebar. In the example below, I'm adding a Categories widget:
Display a sidebar in an specific category
The magic happens when we define in which category we want to display this set of widgets.
- Click on Sidebar location:
This will display the available sidebars of the theme you are using. Choose the one that match your needs.
In my example I selected "As Top for selected categories" and "Edge case" category. This means that my custom sidebar will appear in the "Top" region only on pages that are part of the "Edge Case" category.
Click Save changes and your work is complete.
When you visit the posts in the "Edge Case" category, the top sidebar will display your new, custom sidebar.