6th Aug '24
/
3 comments

Posts Related by Current Post’s Terms in Bricks

One of the frequently asked questions in the various Bricks community sites is:

When viewing a single post (regular or a custom post type’s) I would like to show other posts assigned to the same categories/tags/custom taxonomy terms as that of the current post. How do I do this?

This is how:

In your posts query loop’s query settings

a) select your Post type

b) Enable “Exclude current post”

c) add a Taxonomy query like this:

You should, of course, select your Taxonomy and your terms dynamic data tag.

Get access to all 624 Bricks code tutorials with BricksLabs Pro

3 comments

Leave your comment

 

Related Tutorials..

Pro
Custom SQL Ordering for Sorting Events in Bricks

Custom SQL Ordering for Sorting Events in Bricks

Showing events ordered by the event date with upcoming events in ascending order and past events in descending order.
Categories:
How to List Your Posts Divided by Categories in Bricks

How to List Your Posts Divided by Categories in Bricks

In this tutorial, we'll learn how to display a list of posts divided by each category. The DOM tree Here is how I structured my…
Categories:
Pro
Upcoming Events Grouped by ‘Month Year’ in Bricks

Upcoming Events Grouped by ‘Month Year’ in Bricks

A custom query loop type for showing future events based on a date custom field using three nested query loops.
Pro
Custom Nested Queries in Bricks

Custom Nested Queries in Bricks

In most of the previous tutorials covering nested query loops in Bricks on this site, we accessed the parent query's looping object in the inner…
Categories:
Pro
Conditionally Outputting Query Loop Item Based on Post Meta in Bricks

Conditionally Outputting Query Loop Item Based on Post Meta in Bricks

Rendering query-loop enabled posts depending on the value of each post's custom field value is tricky because by default, the custom field plugins' functions or…
Categories: