The Post Taxonomy Terms feature in Conditional Blocks Pro lets you control the visibility of WordPress blocks based on posts and their terms.
What are Taxonomies?
WordPress taxonomies are used to group content together. You are most likely already familiar with the built-in “Categories” and “Tags” in relation to WordPress posts. Each of those is a taxonomy.
What are Taxonomy terms?
Each taxonomy will have its own terms. So what is a term? Let’s look at a Post Category for example. Each selectable category that you’ve created is known as a “Term”. You might have multiple terms that you use to categorize your posts. E.g Personal, Updates, Newsletters.
You can read more about taxonomies on the official WordPress site.
How to change the visibility of blocks based on taxonomy terms
This feature is well suited to Full Site Editing and Block Widgets because your blocks will generally appear on multiple pages. Therefore, you can find yourself in a scenario where you want to display a unique block only on posts that have a specific category (aka term).
You can selectively display blocks based on taxonomy terms using Conditional Blocks.
- Once you’ve created the block, select it and open the Condition Builder.
- Apply the Post Taxonomy Terms condition.
- Select the Post Type (Posts, Pages. or Custom Post Types)
- Select the taxonomy (Categories, Tags or Custom taxonomy)
- Search and select the terms that a post should contain.
- Configure the Block Action to make the selected block be visible or hidden when the post has the selected terms.