Brick & Relationships
-
I have been teating Pods with the Bricks builder. The one area where I need help with is with Relationships and using the built in php query editor. As such Bricks doesn’t register the relationship but, the same is true with Toolset relationships and the following will work in the php query editor:
return [
‘post_type’ => ‘member’,
‘orderby’ => ‘desc’,
‘posts_per_page’ => ‘-1’,
‘paged’ => 1,
‘suppress_filters’ => true,
‘toolset_relationships’ => [
‘role’ => ‘child’,
‘related_to’ => get_the_ID(),
‘relationship’ => ‘member_of_band’,
]
];If I add the above for the linked band memebers on a “Band” page it returns the musicians for all the bands so in effect the code works up until it hits the nested arrray query to narrow down the ouput to the specific members of the band. Obviously I need to swap in the Pods equivalent here for toolset_relationships.
Is there a slug for that or, an alternative to the code above? My understanding is that it must be in the array format.
- You must be logged in to reply to this topic.