Do you wish you could show or hide different widgets on different pages on your WordPress site? Do you want to customize your WordPress site to have different widgets on your sidebar for different pages of your website?
Today I want to show you how you can have different widgets for different pages, categories, custom taxonomies on your WordPress site. This way you won’t have to create multiple sidebars and duplicating widgets on your site.
Showing or hiding different widgets on your sidebar will help create an uncluttered sidebar and create a clean website. Some widgets may not be necessary for some pages or categories, why show them on such pages?
Show or Hide Different Widgets on Different Pages, Categories and Custom Taxonomies
While some WordPress themes may come with such functionality, most others don’t and you don’t have to start writing codes to show or hide widgets on different pages of your site.
There are several WordPress plugins out there like Display Widgets, Widget Logic, Widget Context, Widgets Reloaded, and Genesis Simple Sidebars that can be used to show or hide different widgets on different pages on WordPress.
But my favorite and easiest way to show or hide different widgets on different pages on WordPress is with the “Widget Visibility” module of Jetpack by WordPress.com plugin. The widget visibility module controls which pages your widget appears on.
Why you may want to show or hide different widgets on different pages, categories or taxonomies on WordPress include the following;
- You may want a widget only to appear on some pages and not show on others
- You may want to show a video on the sidebar of your home page, but not on your inner pages.
- You want a different testimonial to show up in the testimonial widget on each page
- You may want different affiliate products to show on some specific post pages related to them and not others.
- You want to offer different opt-in offers on different website pages
- You want to display a specific widget only on posts by a certain author or in a specific category
- You may want to show some forms on some pages and not others
- Show different ad sizes and units on different pages etc.
Now let’s see how to show or hide different widgets on different pages on WordPress using Jetpack Widget Visibility Module.
First you need to install the Jetpack by WordPress.com plugin if you don’t already have it installed on your WordPress site.
Activate the Jetpack Plugin and navigate to Jetpack > Settings and activate the Widget Visibility Module.
After this then navigate to Appearance > Widget on your WordPress Dashboard.
Then click on any widget you want to show or hide from specific pages, categories or taxonomies and you will notice a new “Visibility” button next to the Save button.
Click on the Visibility button to reveal other options. This is where the magic is done. Here you will choose to show or hide any widget on/from any page.
The first option is to show or hide. If you want to show the widget you will have to choose the show option else choose the hide option to hide the widget.
Then click on the –Select– option below to choose the page where you want to show or hide the widget on/from.
For emphasis let’s say i want to show a widget only on the home page and hide it from all other pages of my WordPress blog. I will then choose “Page” from the dropdown options and select “Front Page” on the next option and save.
This widget will only show on my home page and hide on every other page of my WordPress blog. See images below for illustration.
You can also use same way to hide any widget from any page by using the “Hide” option. This is very important for displaying different widgets on different pages.
You can even show widgets on post pages of specific authors using the author option in a multi-author blog. This is good if you want to share adsense spot with your authors on your sidebar for their contributions on your site.
Other options are categories, tag and date. As you can see this is a simple tutorial that does not require writing any extra code.
What do you think of this tutorial? Use the comment section below to tell me what you think. If you have any questions I will be happy to help you in any way I can.
Akaahan Terungwa says
I so love this entry!
You see, some widgets are only great on the sidebar (of the homepage) and completely useless once a reader leaves the homepage and lands on another of your entry. Won’t it be a great idea, in such circumstances, to maintain a clean site?
Fortunately, my theme has the feature inbuilt. But for all persons who themes do not, this would sure be a great option.
What my theme does not support is the option of removing the default comment box from pages. Does this plugin ensure this functionality?
Nwosu Mavtrevor says
Thanks Akaahan for your awesome contribution but regrettably the Jetpack Widget Visibility cannot remove the default comment box from pages. But i bet there are other ways you can do that using custom functions. What theme is that exactly maybe i could help you.
I appreciate your hardwork. I know about just Display widgets, but you have given here multiple choices for the readers. Good. Now Jetpack also giving the same service. We can decide which widget should appear on particular pages via widget visibility feature.
Nice article Thanks for posting
Display widget is a really time saver. It works with every theme I have used it. This post reminded me when it came as a thought to solve a problem. Anyway I just did a search. Thanks for sharing other plugins.
Thanks for sharing nice and essential tutorial.
Muhammad Mairaj says
Wonderful article about WordPress widgets. How nicely you share its tutorial with the help of some picture through which everyone can easily understand. Thanks for sharing such an excellent post.