17th Nov '22
/
9 comments

Current Post’s Terms in Bricks

Current Post’s Terms in Bricks

Updated on 15 Jan 2024

This Pro tutorial provides the steps to set up a grid of terms (like categories) that the current post is assigned to when viewing single posts using a Terms Query Loop in Bricks.

Step 1

Use your favorite custom fields plugin like ACF or Meta Box to create a image-type of custom field for your terms.

Ensure that the ID/name of your field is category_image since the JSON code you are going to paste in the next step references this.

Edit your categories and select/upload a Category Image for each.

Step 2

Edit the template that applies to singular posts of your post type with Bricks.

Copy the Section's JSON from the link below and paste it in your template.

current-post-terms-query-loop

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Checking if the current term in a Bricks Terms query loop of the given taxonomy has children

Checking if the current term in a Bricks Terms query loop of the given taxonomy has children

There could be situations when you need a way to check if the current term in a Bricks Terms query loop has children or not.…
Categories:
Pro
Events grouped by Event Date custom field in Bricks

Events grouped by Event Date custom field in Bricks

This Pro tutorial for Bricks users provides the steps to output posts of an event custom post type dynamically grouped by the value of their…
Categories:
Pro
Post ID Query Variable-based Post Output in Bricks

Post ID Query Variable-based Post Output in Bricks

How to query a single post of a custom post type using the post ID passed to a page via a URL parameter.
Pro
Posts from Random Categories in Bricks

Posts from Random Categories in Bricks

Updated on 31 Jul 2023 In BricksLabs Facebook group a user asked: How would you query 3 WordPress posts from 3 different categories with Brick…
Pro
Upcoming Events in Bricks Grouped by ‘Month Year’ with Frontend Filtering by Event Type

Upcoming Events in Bricks Grouped by ‘Month Year’ with Frontend Filtering by Event Type

Updated version of the earlier Upcoming Events Grouped by ‘Month Year’ in Bricks tutorial with some improvements:
Pro
How to Insert an Ad or an Element Between Posts in Bricks

How to Insert an Ad or an Element Between Posts in Bricks

How to insert an image or any Bricks element between posts output by a query loop.
Categories:
Tags:
Auto Responsive Grids in Bricks

Auto Responsive Grids in Bricks

This tutorial provides the CSS that can be pasted for automatic responsive grids in Bricks Builder. Posts element Each post will get a right padding…
Pro
Querying Posts by ACF Date Sub Field in Bricks

Querying Posts by ACF Date Sub Field in Bricks

Updated on 17 Nov 2023. This Pro tutorial shows how we can set post__in query parameter of a query loop in Bricks to an array…
Categories:
Tags: