There are two custom post types. Restaurant and CityGuide
I am using post object to assign restaurant in cityguide.
I want to exclude restaurant from post object results which are already assigned in another city guide.
I’ve tried using acf/fields/post_object/query filter but it didn’t help.
It would be greatly appreciable if it there is any solution for it.
That is the only filter that you can use.
In that filter you would need to do a query of all “cityguide” posts and collect a list of restaurants already assigned and then use the “post__not_in” argument to not return these posts.
Thanks @hube2 for your help.
I need to loop through the CityGuide posts and retrieve the assigned restaurant ID’s then supplied those retrieved IDs in “post__not_in”.