0

I have a custom post type called "team".

I created a Post Object with the ACF plugin which Filter by Post Type value of "team" and I target the WordPress Posts for the location.

The idea is to associal team member with a wordpress post.

Let's say that the admin create a new post and after that select a "team member" from the post object.

If the user visit the single member page I want to show all posts associated with the current visited member.

As far as I can see I need to use "meta_query" in the post $args and check if it's equal to the current post id but I can't make it work.

What is the right way to achieve this functionality?

1 Answer 1

0

Have you tried ACF relationships? Try this if you are looking to build a relationship betweent Team and Team Member.

https://www.advancedcustomfields.com/resources/relationship/

Here's a perfect example - https://www.advancedcustomfields.com/resources/querying-relationship-fields/

Let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.