Compare CPT taxonomy to user’s relationship field
-
I’ve created a post type “Orderlist” and assigned a custom taxonomy “Objectrights” to it. I extended users with a relationship field to “Objectrights”.
A user can have several “Objectrights”, an “Orderlist” has only one “Objectright”.
I am now trying to list all “Orderlists” that have the same “Objectrights” as the currently logged in user.
This is almost working like this:
[pods name=”orderlist” where=”objectrights.term_id = {@user.objektrights}” template=”Orderlist”]
The problem is, it will only list the first occurrence. For example the user has the objectrights 1, 2 and 3 and 3 Orderlists each have one of those objectrights assigned. I would expect the shortcode to list all three, but it only shows the first one (whatever objectright I have sorted to the top in the users profile). I have also tried:
[pods name=”orderlist” where=”objectrights.term_id IN ({@user.objektrights})” template=”Orderlist”]
with the same result ??
Can aynone point me in the right direction? Or is it impossible?
- The topic ‘Compare CPT taxonomy to user’s relationship field’ is closed to new replies.