This Pro tutorial provides the steps to add a new query type in Bricks builder for displaying the values of a Checkbox List type of custom field created using Meta Box in a query loop.
Field group:
Location of the field group is a CPT: Project (project).
Field being populated on a project CPT post:
Bricks editor:
After implementing the tutorial, the project entry on the front end:
Note: The actual HTML output i.e., values of a Checkbox list field is not the focus here as it can be done by simply copying the code that Meta Box generates and pasting in a Code element. The point is to see an example of how we can basically loop through items of any array in Bricks in a query loop.
Step 1
Register your CPT (if needed), add the field group with a Checkbox List field as shown above (field ID: services_provided
), populate the field while adding/editing your CPT items.
Step 2
Add the following in child theme's functions.php
or a code snippets plugin:
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account