Exclude Relationship field item
-
Hello,
thank you for this fantastic plugin.I have custom post type Houses and custom post type Accommodations.
Each house has several accommodations (apartments) so I created a relationship custom field “Apartments” for the custom post type Houses and associate several accommodations per each house.On the Accommodation post I want to display a list of all other accommodations associated for the same house. I want to exclude current post from the list and I am using shortcode like this:
[pods name=”house” id=”HOUSE-ID” where=”accommodation.id != ‘ACCOMMODATION-ID'” template=”Apartments Grid”]
which doesn’t work but displays all accommodations associated with defined HOUSE-ID.
My template code: https://pastebin.com/ZXpyPZ34
Thank you for any help.
- The topic ‘Exclude Relationship field item’ is closed to new replies.