Get access to all 633 Bricks code tutorials with BricksLabs Pro
Related Tutorials..
Conditionally Outputting Elements only for Posts that have a Specific Taxonomy Term
Using the core WordPress has_term() function for checking if the current post has a specific term of a given taxonomy.
Categories:
Tags:
Pro
Conditional Rendering in Bricks Based on CSS Class
Updated on 19 Jun 2024 A user asks: Is there a way to apply the same conditions to several elements like we set styles appending…
Categories:
Tags:
Conditionally Outputting Based on Query Count in Bricks
Update on 22 Sep 2023: There's a much simpler built-in method now. See this post. In the Bricks Facebook group a user asks: Is there…
Categories:
Tags:
Pro
Condition to Check if the Current Category Has At Least One Child
Looking to render an element in the category archive Bricks template only if the category of the current category archive page is a parent? This…
Categories:
Tags:
Disabling Bricks’ Header & Footer Conditionally with Custom Fields
How to give content editors the ability to disable headers or footers on specific posts/pages using custom fields.
Categories:
Tags:
Check if a given category has at least one post
There could be situations where you want to check if a given category (by its slug) has at least 1 post assigned to that category.…
Categories:
Tags:
Pro
Getting Field Values from a Connected CPT when using Meta Box Relationship in Bricks
Conditionally render elements in a single template of a CPT depending on the value of a regular custom field.
Categories:
Tags:
Pro
Conditional Related Posts in Bricks
How to output a section only if there is at least 1 related post for the current post being viewed.
Categories:
Tags:
Pro
Query Variables Condition in Bricks
This Pro tutorial provides the steps to register a custom function that returns true or false depending on whether the current page URL has specific…
Categories:
Tags: