Do you want to exclude some post categories from a category list in WordPress? You may want to exclude some post categories for different reasons such as keeping certain categories hidden from certain audiences for streamlining your website’s navigation.
With the Taxonomy Listing block from the Nexter Blocks, you can easily exclude categories by ID from a category list.
To check the complete feature overview documentation of the Nexter Blocks Taxonomy Listing block, click here.
Requirement – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.
To do this, make sure you’ve created some post categories then follow the steps
1. Add the Taxonomy Listing block on a page and select an appropriate style from the Style section from the Layout tab.
2. Then select an appropriate layout from the Layout section.
3. After that select Categories from the Select Taxonomy dropdown.
4. Then go to the Query tab, in the Exclude Terms ID field, you have to add the category id that you want to exclude from the list.
Note: You can add multiple post IDs separated by commas.
To find a category id, from the Dashboard, go to Posts > Categories, now hover over the category that you want to get the id of. At the bottom of the browser, it will show the category edit URL with its id. The number after ‘category&tag_ID=’ is the category id.
Note: Following this process, you can exclude tags, product categories, product tags, and custom taxonomies.
Now that particular category won’t show in the list.