Sidebars play a very critical role in designing a WordPress website. They are the widget-ready areas that allow you to display information that is not part of the main page content, on the sides, above or below the main content. They can be used to display recent posts, list of your website pages, popular post and ads among other information.
Why You Need Sidebar?
Some of the popular uses of sidebars include:
- To provide site visitors with value-add components.
- Add information that could not fit on the main content area.
- Place ads and call-to-action without disrupting the flow of the content.
- Enhance navigation by displaying links to recent posts, categories, tags, search function and so on.
- Display information from external networks such as feeds from social networks.
The flexibility of how you can use sidebars depends on the theme you have chosen for your website. Unfortunately, most free WordPress themes display the same sidebar across all the pages and posts. This limitation in some cases is not logical and you may need to display multiple custom sidebar for your different posts based on categories. This post will teach you how to create and use different sidebars for different categories in WordPress.
Step 1: Install and Activate WordPress Custom Sidebars Plugin
There are a variety of sidebar customization plugins for WordPress, providing different functionalities for your needs. If you need to customize sidebars for your categories, archive pages or post types, then “Custom Sidebars” is the right choice.
- Open your site dashboard and go to “Plugins”, choose “Add New” and search for “Custom Sidebars – Dynamic Widget Area Manager”.
- Click the install button and then activate the plugin.
WPMU Dev is the developer of the plugin who also offers various other WordPress services like WP Smush. There are 200K active users are using the plugin on their site, so they can’t be wrong. The free version of the plugin installed from WordPress repository will show advertisements on the widgets area. If you want to get rid of the advertisements, you can subscribe to their pro version. However, you can’t purchase this plugin separately, you need to subscribe to their product portfolio on monthly payment of $49.
Step 2: How to Replace Theme’s Default Sidebar
Your WordPress theme has its default sidebar, which shows on all your pages and posts. You can replace the existing sidebar or simply assign it to a category.
- Go to “Appearance” on the dashboard menu and select “Widget” from the menu items.
- Under “Theme’s Sidebars” you will find the different sidebars that your current theme supports.
- Expand the “Main Sidebar” and check the option “Allow this sidebar…”.
Step 3: Create a Custom Sidebar
- On the middle column, under the title, “Custom Sidebars” click the box to start creating a sidebar for a particular category.
- Enter a name and description for the new sidebar and click the “Create Sidebar” button.
Learn WordPress: Check out 600+ free WordPress tutorials.
Step 4: Set the Custom Sidebar Location
- To assign the newly created sidebar to a category of your site, click the “Sidebar Location” link at the bottom of the sidebar.
- Check the “As Main Sidebar for the selected category” option to apply the replacement on all the posts in a particular category.
- The click the text box to select a category and click “Save changes”.
Step 5: Adding Widgets to the Custom Sidebar
- To add a widget to the sidebar, drag an item from the “Available Widget” column on the left and drop it to the custom sidebar.
- You can click the arrow for a particular widget to access more settings.
- Once customized, click “Done” for each of the widgets to save the changes.
Step 6: Assigning Sidebar to Category
- If you have only a few posts for a given category, you assign each post from the post editor.
- Open the post editor and on the right edge of the display, scroll down and select a category sidebar for the post.
- When you have many posts and categories on your site, this process may be tedious and tiring. Luckily, you can assign the sidebar to all posts in a category with the “bulk action” feature.
- Go to “Posts” on the dashboard left-side menu and select “All Posts” to display all the posts on your site.
- Filter the posts by a category by selecting the category and then click the “Filter” button.
- Check all posts by clicking the box at the top of the list, under “Bulk Actions” choose “Edit” and click the “Apply” button.
- Look for the “Custom Sidebars” section and select a sidebar to display for the category. Click “Update” to save the changes.
Sidebars are very important tools when designing your WordPress site. They help you to display extra information without interfering with the main content. This information may include: links to website pages, a video, or any other widget. With WordPress Custom Sidebars plugin, you can add a different sidebar for every category or post type without any coding. This enables you to display content that is relevant to and makes sense for the different category, thus increase user experience.
- Create custom sidebars for taxonomies and post types.
- No coding knowledge required.
- Works for custom post types.
- Advertisements on the widget area with free version.
This plugin was discontinued due to full site editing function introduced in WordPress 5.8. You can use other plugins to create multiple sidebars in similar manner.