How to Use Different Sidebars on Different Pages, Posts, or Categories
I bet that you have more than one type of content on your WordPress site. So why is your sidebar the same across every single page and category? Using different sidebars for different pages and categories allows you to offer readers a browsing experience that’s much more specific to their needs.
At least that was my thought when I went searching for a solution to change my sidebar depending on the page and/or category a visitor was on!
After a little digging, I found a solution that makes sidebar customization easy. And in this post, I’m going to show you exactly how to do it.
When Are Different Sidebars for Different Pages or Categories a Good Idea?
Using different sidebars allows you to offer your readers a better experience by making it easy for them to find content that fits their interests. For example, say you have a sports blog that covers, in part, both basketball and baseball.
While there may be some overlap between the audiences, for the most part, your readers will be primarily interested in only one of the topics. So if you’re showing baseball content in the sidebar on your basketball content…that’s wasted space for most of your audience.
But if you use different sidebars, you could show a basketball focused sidebar on all of the basketball content and a baseball focused sidebar on all of your baseball content.
But It’s Not All About User Experience
Good user experience is great…but most of us like making money as well, right? Well, content personalization helps you do that too.
Lately, there’s been a big push for content personalization in marketing. That’s why 94% of marketers believe that “personalization of the web experience is critical to current and future success”. And it’s also why content personalization increased sales by 20% in Monetate’s study.
Now, marketing personalization goes way beyond just showing different sidebars on different content. But if you don’t have access to expensive software, different sidebars are a good start…
Let’s do another example. Say you have a blog about…running a successful blog. You would probably have content that targeted both beginners and more advanced bloggers, right?
For the content targeting beginners, you could use your sidebar to push visitors towards beginner-friendly affiliate offers like shared hosting. Then, you could use a different sidebar on the advanced content to push people towards more advanced offers like Ahrefs on the assumption that a seasoned blogger isn’t on the hunt for new shared hosting.
How to Use Different Sidebars for Different Pieces of Content
All that text above to say this:
Using different sidebars on different pieces of content is a neat way to improve your site. Here’s how you can do it for free using a plugin called Content Aware Sidebars.
Content Aware Sidebars works with all themes and lets you create an unlimited number of custom sidebars for:
- Custom Post Types
And another powerful feature is that you can chain these conditions together. For example, you could have one sidebar display on both a single category of your blog, as well as a custom post type.
Here’s how to use the plugin.
Step 1: Create Your New Sidebar
Once you install and activate Content Aware Sidebars, you’ll get a new Sidebars link in your dashboard that you’ll use to manage all of the sidebars on your site.
To get started, head there and click on Add New:
Step 2: Choose Your Conditions
Conditions are what actually trigger your sidebar. For example, if you choose a Category condition, your new sidebar will display on that category.
You can add multiple conditions – just make sure to pay attention to the difference between AND and OR.
With And, all conditions need to be met at the same time in order for your sidebar to be displayed. With Or, your sidebar will display as long as at least one of the conditions is met:
Step 3: Choose Your Options
Next, you need to choose your Options on the right side of your screen.
You do four things:
- Action – you can either have your new sidebar completely replace an existing sidebar. Or, you can have it merge with that existing sidebar. This allows you to have one base sidebar and append additional content as needed.
- Target Sidebar – this is the sidebar you want to replace or merge with.
- Merge Position – if you chose Merge and not Replace, this will determine whether your new sidebar content is added above or below the existing target sidebar.
- Visibility – you can restrict by user status (or user role in the Pro version).
For example, to completely replace your existing sidebar, you’d configure it like this:
And if you just wanted to add your new sidebar content above your existing sidebar’s content, you’d do it like this:
Step 4: Choose Your Schedule
Another nifty feature is that you can choose to schedule your sidebar to only run at specific times. If you’re running a limited promotion, this is a good option. Otherwise, you can just ignore it to have your sidebar display 24/7:
Once you’re finished setting everything up, make sure to hit the Save button.
Step 5: Add Content to Your New Sidebar
Once you’ve saved your new sidebar, you can add content to it in the normal widget interface. So head to Appearance → Widgets and you should see your new sidebar:
You can drag widgets over like normal – it functions exactly the same as any other sidebar on your site:
And if you want to quickly turn your sidebar on or off, you can just hit the toggle button:
And that’s pretty much all you need to do! As I said, Content Aware Sidebars lets you create unlimited sidebars for your site, so you can repeat the process for as many sidebars as needed.
Conflicting Custom Sidebars? Use Force Replace
If you create a number of custom sidebars, you might run into the situation where you have two conflicting sidebars. That is, you have two different sidebars that are triggered to display for the same post.
Don’t worry – there’s a built-in mechanism to handle this.
First, if two or more sidebars are set to replace the same target sidebar, the plugin will automatically merge them so as to not break anything.
But, if you don’t want that to happen, you can also set something called a Forced Replace in each sidebar’s options:
If you set one sidebar as Forced Replace, it will completely replace the sidebar, even if there’s another custom sidebar targeting that sidebar. This allows you to create a sort of “master” sidebar.
If two competing plugins both have Forced Replace turned on, Content Aware Sidebars will just use whichever loaded last.
Wrapping Things Up
I’ve been using this plugin on one of my personal sites and I’ve found it to be a joy to use. It’s simple, powerful, and doesn’t have any bugs.
It also seems to play nice with caching plugins, which is important. So far, it gets a strong two-thumbs up!
Now over to you – have you tried using different sidebars for different pieces of content on your WordPress site? If so, do you have any tips for getting the most from this functionality?