For example, I have Teams and Players CPT. I created relationship between the two, so when visiting team A, there is a list of all players and one can be add as needed to this particular team. However, when visiting team B, the players that were selected to team A can be selected to team B.
In this filter you would need to do gather al list of all of of the players already selected for other teams. To do this you would need to do a query to get all of the teams and then get the players field from each post and make a list of post IDs in an array. They you would use these results in the “post__not_in” argument for the query.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users