How to Show Different Sidebar for Each Post and Page in WordPress
December 6th, 2017 | by Ravi Chahar || 4 Comments |
Just a while ago, one of our readers asked if it’s possible to show different sidebar for each post and page in WordPress. Well, you would be happy to know that today, you’re going to learn it.
By default, every WordPress theme controls its structure by showing a fixed sidebar which can show only one type of the content you add once.
It means if you add the widgets to the sidebar, it keeps showing on all the pages and posts the same. You can’t decide to show different sidebar for each post and post.
But with this article, you will learn to accomplish this within a few minutes.
Why Would You Need to Display Different Sidebars
Many people complain that whenever they add something to the sidebar of their theme, it remains same on all the pages and the posts.
They want to display different ads or email newsletter box on different pages. Well, it can be possible if you add the custom sidebars.
If you’re running an online course website, it can be the best thing for you. And for your business marketing, you can add different widgets on the pages and different for the posts.
Create the Custom Sidebar to Show Different Sidebar for Each Post and Page
Then you have to follow these steps.
Step 1:- Go to Appearance>>Theme Sidebars and you will see the exact page as you see for the default WordPress menu.
Fill the name of the sidebar and click on the Create Sidebar button.
Step 2:- A new sidebar will get created. Now you have to choose the category of the sidebar from the drop-down menu.
If you want to replace the page sidebar then select the option. Depending on your theme current sidebars, you will have the options.
You can also fill the description of your custom sidebar.
Step 3:- If you want, you can add the posts, pages or anything from the left side menu. Just like you do while adding topics to WordPress navigation menu.
Save the sidebar and you’re ready to add the widgets.
Step 4:- Go to Appearance>>Widgets and you will see the name of the custom sidebar you have just created. You can add your popular posts, any ad or even an affiliate link.
Depending on your choice, you can select any and save it.
Now you can check your custom sidebar at the position you have selected before.
I Hope it’s Easy to Show Different Sidebar for Each Post and Page
It’s always a good idea to interact more people. If any of your visitors are reading a post and he/she sees an affiliate link of any web hosting.
Maybe he/she decides to read a few other posts. Well, your custom sidebar will work in such situation. Every time some visits a new page, he/she will see your custom sidebar.
I have explained all the step in this tutorial. Can you now show different sidebar for each post and page on your WordPress website?