Consider this scenario:
CPT: job
Taxonomy: industry
Custom field: job_visibility
of type Radio with a default value of public
. The other value is private
.
Requirement: Show the industries associated with jobs for which job visibility is public.
This Pro tutorial shows how.
Let's look at this sample data:
After implementing the tutorial, the terms output will be Construction and Pharmaceutical.
"Job Fields" field group created with Meta Box (custom fields plugin does not matter for this tutorial, the same can be done with ACF as well):
Step 1
Enable query loop on a Block in the Bricks editor and select the query type of Terms.
Select your taxonomy.
Add a Heading or Basic Text element inside the query-loop Block having:
{term_name}
This will output all the terms of the selected taxonomy.
Step 2
Add the following in child theme's functions.php
(w/o the opening PHP tag) or a code snippets plugin:
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account