WordPress Sidebar is basically a vertical column provided by a theme for displaying information other than the main content of the web page. Themes usually provide at least one sidebar at the left or right of the content. They usually contain widgets that an administrator of the site can customize.
Typically a sidebar on the blog display throughout your site on all posts, pages, categories, and archive pages. However, sometimes you may want your sidebar content to change based on specific posts or pages like:
- Simple call
- Multi sidebars (Different sidebar for different pages)
- Simple 404 page
- Left and Right Sidebars (Two in one theme)
As the articles posted by the admin of a WordPress site are called posts and pages are like posts. Pages can be managed in a hierarchical structure in WordPress.
For example, you can show different featured content in the sidebar of your most popular posts, add different email signup forms, or display ads.
Since this is a long article to go through, the contents covered in this article are mentioned here pointwise for your ease to find the relevant piece of information.
- Pros and Cons of a WordPress Sidebar
- Custom Sidebar and its use
- Different ways to manage WordPress Sidebar
- Add Widgets to your custom Sidebar
- Sidebar Template for WordPress blog
- Hide or Remove Sidebars
Over the last few years, many designers have been challenging every assumption we have about web design. Usually, these questions spring from an exploration of a common theme of the idea of a primary objective that functions as a filter for all site-related choices, especially design choices.
The filter works like this: whenever you make a design decision simply ask yourself if that decision will help or hinder you in achieving the primary objective of your website. Often times answering that question is difficult. It may help to weigh the pros and cons, as we will do below in case of the sidebar.
- Running Ads
- Increase email sign-ups
- Promote related products
- Organization (especially for e-commerce)
- Visually unappealing UX
- Not compatible with mobile
- Cluttered and clunky information
- Unnecessary for many businesses and portfolios
To customize your sidebar, you are not required to write a single line of code. It only takes a WordPress plugin to make the difference.
Have a glance over what custom sidebars are and how to create sidebar in WordPress with and without plugins to customize your posts and pages.
Without a doubt, Custom Sidebars is a must-have plugin, especially if you run a membership site. First-time visitors to your site don’t necessarily need to see the same content as regular visitors. Likewise, it makes sense to display different information (or widgets) to users who are logged into your site (such as account details), as opposed to users who are logged out.
Custom Sidebars is a free plugin which lets you easily create multiple sidebars on your site, and then decide which pages to display them on. These can then be displayed wherever your theme allows you to display widgets, whether that is the sidebar, footer, or elsewhere on your site.
Lots of sites display information about the website in the sidebar area. However, this information isn’t very useful when the visitor is currently viewing the ‘about us’ page. Instead of wasting the space, by using a custom sidebar, you could display your email newsletter sign up form or links to your best content instead.
Another use for it could be to display links to other posts from the same category as the post the visitor is currently viewing. This makes the sidebar content highly relevant to what the visitor is reading, increasing the chances of them clicking through to more of your content.
You could even use this approach to display external links to related products or services, perhaps with an affiliate link, which will be of interest to readers based on the current post they are viewing.
Different (custom) sidebars for different pieces of content
Using different sidebars on different pieces of content is a nice 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.
When and why you need different sidebar on different posts?
Somehow, I bet that you have more than one type of content on your website. Thus, why is your sidebar the same on every page and post?
Well, enabling different sidebars for pages and posts allows you to offer your readers a browsing experience than others. That becomes much more specific to their needs after enabling it.
Overall, that was my thought when I needed a different sidebar in WordPress.
When you run a site with a large number of categories, it does not make sense to show the same sidebar on posts. You may have the following situations, where it shows different sidebar:
- Based on categories
- Archive pages
- Custom pages like 404 page
- Individual post or page based on the need
There are numerous plugins available on the WordPress repository for creating custom sidebars. But all the above-listed needs can be simply fulfilled with a single plugin.
Now, 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 link in your dashboard that you’ll use to manage all the sidebars on your site.
To get started, click on Add New button.
Step 2: Choose Your Conditions
Conditions are what actually that 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 are needed to be met at the same time in order for your sidebar to be displayed. Or, it 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.
Keep four things in mind:
- Action – you can either have your new sidebar completely replace an existing one. Or, you can have it merge with that existing sidebar. This allows you to have one base 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 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 content above your existing sidebar’s content, you’d do it like this:
Step 4: Choose your schedule
Another feature is that you can choose to schedule your sidebar to only run at specific times. It’s good if you’re running a limited promotion. Otherwise, you can just ignore it to have your display 24/7:
Once you finish the settings, 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 can 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 it on or off, you can just hit the toggle button:
And if you just want to add a new content above your existing sidebar’s content, you’d do it like this:
That’s what you require to do. As said before, it lets you create unlimited sidebars for your site, so you can repeat the process for as many as needed.
1. Dynamic widgets for sidebar
The thing you must know is, by default, your WordPress sidebars remain the same as it was ever before. Somehow, it means that you are illustrating users the same thing. Whether they are viewing an archive page, category, home page, or even a single page from your Website.
It only depends on the user what content they are looking at/for. Thus, changing sidebar widgets according to the user. Can make a huge impact, on how users interact with it on your WordPress.
However, using the Display Widgets plugin. You can show and hide widgets on the very posts, pages, archives, home, or blog page of your website. Similarly, you can also represent or hide the widgets to users based on their login status from your PC.
2. Email subscription
Have you ever wondered why email signup forms are often the first item in sidebars? Mostly on popular blogs? Here is the answer, That’s email is still the most successful way to communicate with your readers as compared to others.
Most of the email service providers as MailChimp, AWeber, etc. Will provide you with a simple code that you can add to text widgets. Whereas, these sign up to such mails service provider are not very effective in terms of conversion as of the Email.
However, by choosing OptinMonster to develop beautiful and highly engaging option forms. You can significantly increase your conversions than any other email.
This email allows you to A/B test your sidebar option forms. And thereby, you can make data-driven decisions about what’s working and what’s not in this field.
3. Showcase your best content
Nowadays WordPress arrives with a built-in recent posts widget. Often this widget doesn’t perform well.
The reason for not performing well is, your recent posts may not always be the best content. To describe your website to a new user.
However, you should use a popular posts plugin. To display the most popular content of your site. As a plugin is defined as a type of software that contains a group of functions that can be added to a WordPress website. The plugins are used to provide adiitional functionality to the application.
Thus, you may also join it with a related posts plugin. For showing the most relevant content to new users of the very working site.
4. Multiple sidebars
A multiple Sidebar is an approach for creating smart sidebars. And using them at once on your website. However, it is based on criteria which you have selected very before.
Now, you just have to install and activate Content Aware Sidebar plugin on your PC. thus, it allows you to create smart sidebars on your WordPress Website. Despite showing or hiding widgets for the specific pages. You may create a totally new one.
5. Sticky sidebar widgets
In this, the content column of your WordPress site becomes a bit lengthier than your actual one. Somehow, this means that when users scroll down then there is nothing to look at the column from the working window.
Thus, you may add sticky floating sidebar widgets. To make sure that there is always a call for action. Which is visible to your readers as he/she scrolls down the working window.
6. Use images
As we know that images are much more engaging than that of plain text. Thus, if you want to grab the user’s attention. Then use images as banners and buttons on your website. Even, you may link those banners and call to actions in different areas.
However, you can simply upload an image by using the media uploader. And the HTML code to display the image in a text widget on your website. Whereas, if you are not very aware of HTML. then you may use an image widget to add images to your WordPress sidebar.
Here, a sidebar is a WordPress theme feature, which is basically a vertical column provided by a theme for displaying information other than the main content of the web page.
Also, theme is a group of stylesheets and templates that are used to describe the appearance and display of a WordPress site. A WordPress theme changes the layout & design of your site. And templates are those files which control how your WordPress site will be displayed on the Web.
7. Showcase social proof
Showcase Social Proof this arrives with a question. Have you ever seen How popular blogs brag about their follower count in sidebars? Thus, displaying your follower count is known as social proof.
In other words, it is a marketing technique. That helps you gain trust by showing people the number of followers you already have on your site.
However, you may use the Social Count Plus widget. To display your follower count on your website. Thereafter, you may also represent your MailChimp subscriber. After that, count to encourage more and more users to signup for your email list from your PC.
8. User engagement tools
The recent comments, polls and surveys, user rankings, points system, are just some of the ways to boost user engagement.
Thus, displaying them in your sidebar helps to boost user engagement. Somehow, this increases your page views and time that each person spends.
9. Fade in last sidebar widget
Fade In Last Sidebar Widget this nifty little trick is used on many popular blogs. And even on many of the websites.
Somehow, it simply fades in the last sidebar widget of your website. Thus, the animation makes the widget eye-catchy and noticeable. Which thereby, dramatically increases the click-through rate which in short stands for (CTR).
10. Use custom styles for widgets
As we know that, sidebar widgets use the same colors and style defined. That’s why they appear the same!
However, you may use the custom styles. For using different colors, on your widgets to make them more noticeable as compared to others.
Now, it’s time to add widgets to your custom sidebars. Follow each path to add widgets as Appearance >> Widgets page. As, widgets allows you to add content and features to your sidebar without writing any code.
Here, you will find your newly created or developed sidebar among your theme’s on default.
Move along with this and you will be able to add the widgets. However, the plugin will represent the sidebars based on your website settings.
Further, you can visit your selected pages to see the things in action or working mode.
You can create separate sidebar templates for different pages of your site by using a simple include statement. When you write an include statement, you’re simply telling WordPress that you want it to include a specific file on a specific page.
The code that pulls the usual template (sidebar.php) into all the other templates, such as the Main Index template (index.php), looks like this:
|<?php get_sidebar(); ?>|
If you create a page and want to use a sidebar that has different information from what you have in the current template (sidebar.php)? Follow these steps:
1. Create a new template in a text editor such as Notepad.
2. Save the file as sidebar2.php.
3. In Notepad, choose File, Save. When you’re asked to name the file, type sidebar2.php and then click Save.
4. Upload sidebar2.php to your themes folder on your Web server.
5. The template is now listed in your theme files on the Edit Themes page (log in to your WordPress Dashboard, click the Editor link on the Appearance menu).
6. To include the sidebar2.php template in one of your page templates, find this code
|<?php get_sidebar(); />|
7. Replace it with this included code:
|<?php include (TEMPLATEPATH . ‘/sidebar2.php’); ?>|
8. Using that include (TEMPLATEPATH statement, you can include virtually any file in any of your WordPress templates. You can use this method to create footer templates for pages on your site, for example. To do this, first, create a new template with the filename footer2.php. Then locate the following code in your template:
|<?php get_footer(); ?>|
and replace it with this code:
|<?php include (TEMPLATEPATH . ‘/footer2.php’); ?>|
The 3 most common cases for how WordPress themes handle inactive sidebars are:
Remove sidebar from individual page
- In the Admin Dashboard, go to Sidebars -> Add New.
- Click on the “Select content type” and select Pages.
- Click on the new input field and select the pages you want to remove it from (leave it empty for all pages).
- In the Options box, select Action: Replace and pick the Target Sidebar you want to hide.
- Give it a new title and click the Save button.
Remove sidebar from blog or posts
- On the Edit Sidebar screen, click on the bottommost “Select content type” and select Posts.
- Leave the new input field empty.
- Click the Save button.
Remove sidebar from custom post types
With the powerful conditions in Content Aware Sidebars, you can also remove it from any custom post type, any custom taxonomy, and other content created with plugins.
For example, you can hide the sidebar on posts by a featured author, on posts in a select category, etc.
Here, in this blog, we have discussed How To Create Sidebars For Different WordPress Posts?
Often we concluded the overall process of Custom Sidebars Installation and Configuration. They do add value to any blog post.
We hope this blog helped you. If you find the blog useful, do not forget to use the comment section provided below. Also, share the blog with your peers. You are on your way of getting more exposure.
Talk to our WordPress Migration team to get instant support from our Experts. If you need any help then contact us and fix all your problems, dial + 1 844 275 0975(Toll-Free).