Sidebars are literally located to either side of posts and pages of websites, bloggers who rely on Content Management Systems (CMS) as WordPress, seek to manipulate them in order to modify whether or not some specific information will be displayed or how it would appear to Internet users who visit different posts. Hence, they often need to somehow change the “look” of things depending on the type of visitors they have at certain times and the kind of information they are visiting the website for.
Widgets are simple tools we may use to bring some aid for specific purposes, one of them is meant to enhance how sidebars look like and what content they have. There’s a plugin called Display Widgets that allows you to choose easily what specific content will be shown on the sidebars for some of the pages or posts with particular features. For example, let’s say we’re trying to show ads to sell energy drinks, but we wish those to only appear when visitors come through a category we previously named as drinks. In addition, we have other ads about luxury cars and we need it to be only visible to visitors coming through our category cars. Let’s follow the actual steps to make this work:
- First, we need to install the plugin and activate it inside the WordPress Admin page. Check here our tutorial to install or update a plugin if you’re not familiar with the steps.
- Then we should go to Appearance > Widgets.
- Locate the sidebar content to the right.
- As soon as we open a widget, we’ll find a new section called Show Widget For.
- The first option will let us choose whether or not Everyone, Logged-out users or Logged-in users may see the widget.
- The second option will allow us to select if you want to Hide or Show it on checked pages.
- Then we need to check the places where it’ll be visible or hidden: Miscellaneous, Pages, Custom Post Types, Categories, etc.
- Finally Save changes.
There are other plugins for WordPress that might be of use as well like Widget Logic and Widget Context, however, they’ve not been updated for a while and therefore, we do recommend to test them cautiously.