Compare current user with user relationship of a post
-
Hello,
I have a Custom Post Type called ‘modula-gallery’, where I added the relationship field ‘my_relatedcustomer’ to store a single user from selection.
I can’t figure out how I can compare the related user to the wp_get_current_user();
The code from this post https://docs.pods.io/tutorials/get-values-from-a-relationship-field/ seems suiting, but how would it work with relationship users?
My goal is to have a php script that returns a clickable list of posts
– where the post type is ‘modula-gallery’
– where the current user is the same as the one selected in the relationshipfield called ‘my_relatedcustomer’I was also wondering: I extened a existing post type: Will there be data loss if the plugin that created ‘modula-gallery’ updates?
I tried it for hours with query building, but I just don’t get it.
Thanks a lot in advance.
Warmly, o2goThe page I need help with: [log in to see the link]
- The topic ‘Compare current user with user relationship of a post’ is closed to new replies.