Quantcast
Viewing latest article 7
Browse Latest Browse All 53

How to selectively display widgets on specific posts or pages

WordPress by default display the widget every where. So if you want to display or hide the  widgets based on rules then you will need to make use of plugins.

In this tutorial I will cover 4 plugins which can be used to hide or display widgets in posts or pages control the widget visibility of specific post and pages.

1. Using Widget Logic Plugin

This is a very powerful plugin. It works by adding an extra logic field to every widget.  It lets you control the pages that the widget will appear on . Refer to this screenshot.

So for example if you want the search widget to only appear on home page , then you will simply use the is_home() tag in the logic field. Similarly if you DONT want to display the search widget on home page, you will use !is_home() tag in the logic field.

This can be configured in a lot of ways.  For example, you can display / hide widgets on certain categories , you can display widget on a certain posts etc. It is a very powerful plugin and since it uses conditional tags,  it can be a bit difficult for newbies and non technical users.

2. Using Widget Context Plugin

Widget context is very similar to Widget logic. The main difference is the user interface.  The widget Context gives you a friendly user interface to control the widget visibility. Refer to this screenshot

It is possible to display / hide widgets on specific posts, pages, categories , url etc.  It is a beginner friendly plugin as users dont require knowledge of conditional logic to operate the plugin.  So, if you are an absolute beginner , I recommend you use the Widget context plugin

3. Using Dynamic Widgets Plugin

This is another popular plugin which allows you to define visibility through a user interface.  The plugins opens a separate page to configure the visibility rule. This can be a minor inconvenience. Refer to this screenshot

Apart from that it is a good plugin and supports rules like specific categories, display on a url, specific posts, archive pages etc.

4. Using Jetpack Plugin

If you are using Jetpack plugin, then you can utilize the inbuilt widget visibility feature to control the widget display. It gives you a user friendly interface to configure the widget visibility. Visibility can be controlled based on category, post , pages, users role, date etc. Refer to this screenshot

There are other plugin like Restrict widgets and Widget Manager Light. But I am not covering them in this tutorial as they are not as popular as the above four plugins.

 

The post How to selectively display widgets on specific posts or pages appeared first on SpiceWP.


Viewing latest article 7
Browse Latest Browse All 53

Trending Articles