Filtering CPTs by JetEngine Relations in JetSmartFilters

This probably belongs on the Crocoblock forum but since it also pertains to the Bricks Query Loop (I think?), I thought I’d try my luck here with fellow JetEngine users.

I have two CPTs (Author and Book) and a many-to-many Relations linking the two (Author → Book). I would like to have a dropdown Author filter modifying the loop that displays a grid of Books.

Has anyone successfully implemented something like this using JetEngine Relations and JetSmartFilters?

(I managed to get the Authors’ IDs listed in a dropdown filter following Step 1 & 2 of How to Filter by Relation Meta — JetEngine | Crocoblock - but alas, the subsequent steps are a little confusing for me)

Update: a small progress, but no closer to solving this.

I was able to obtain some details of Books using JetEngine’s Query Builder and display it using a Bricks Query Loop, and the Author ID dropdown filter I created previously is able to modify the grid.

However, the JetEngine Query (using SQL Inner Join) does not have the usual data required to display the Books nicely on the front-end (e.g. missing feature image, url link) - and the Author is also in the form of its numeric post id.

So yes, the Books grid is now filterable. But no, its not usable by the the end user :sweat_smile:

Here’s the JetEngine Query, for explanation and posterity:

  • Query Type = SQL/AI Query
  • From table = posts
  • Use Join enabled
  • Join Tables
    ** Join Type = Inner Join
    ** Join Table = jet_rel_default
    ** When current table column = child_object_id
    ** Is equal to other table column = ID

Update: Solution turns out to be a lot simpler, thanks to Crocoblock’s support pointing me to this knowledgebase. Essentially, JetSmartFilters has built-in ability to create filters based on JetEngine’s Relations - and it works on the frontend using Bricks.

You’ll have to do some “translations” for Bricks, as this knowledgebase is written for Elementor - but its fairly similar (even I was able to work it out :sweat_smile: ): How to Filter by Relation Meta — JetEngine | Crocoblock

Posting here for anyone else who might be investing in Brick Builder and JetEngine!