Recently we have got many queries in which users were asking like “I want to exclude some categories that I don’t want to show in the list of categories, not delete them“. In such cases this guide will definitely help you to get include/exclude categories according to your needs.

So, in this tutorial we are going to discuss How to include/exclude categories in category widget If you are using the categories widget which is mainly getting used to show all the categories of your listings OR events OR any other post type(s) of your site.

If you are looking to show some of the specific categories only, then please go through below steps:

  • First of all traverse to WP-admin> Appearance> Widgets.
  • Place Category widget to the homepage sidebar area from the available widgets.
  • Now select one taxonomy type from the drop-down list.
  • Here you can also manage other options like order, order by, list view/grid view etc as per your requirements.
  • Now if you want to show some of the categories at your site. Then there is an option of include and exclude within this widget.
  • In these fields you have to provide specific category ID so that you can include/exclude these categories from the homepage sidebar area.

If you are getting confused for how to get category ID? then here is a quick trick for your reference:

  1. Login to your site’s back-end to WP-admin> Listing/Events> Listing/Events category. Hover on category which you want to exclude.
  2. See below video to get more idea about this and you will be able to get the specific Category IDs by yourself.
  3. Once you get the category ID, you can place this ID in include/exclude fields as per your needs. Please refer to the screenshot for more idea.
  4. Here is the screenshot for your reference:exclude
  5. Once you place this category ID, save the widget settings.

PS: Before you take a look at the front page. Please clear Tevolution your cache at your site and then check the front page sidebar area.