Displaying a WordPress Widget on a Particular Page or Post | Widget Logic



If you want to display a wordpress widget on home page only or on a particular page or on a particular post or on a group of posts or pages, you can use the plug in widget logic to do that.

In this video I showed, how to do that using the plugin widget logic.

When you use widget logic plugin, there won’t be any settings you can see for this plugin. It will add a new area box below the widget you are adding where you have to write specific functions.

For example you want to display the widget only on home page then you have to use the function is_home().

If you want to display the widget on a specific page then you have to use the function is_page(id) and id is the id of the page. I have explained how to get the id of the page in the video.

If you want to display the widget on a specific post then you have to use the function is_single(id) where id is the id of the particular post.

You can use the logical condition ‘or’ when you want to display the widget on a group of pages or posts.

If you like the video please subscribe to my channel bloggingmypassion.

Thank you,
Subbu.

6 Comments - Add Comment

Reply