Home › Forums › ACF PRO › How can I disable for selecting "non-public" posts from lists in relation field? › Reply To: How can I disable for selecting "non-public" posts from lists in relation field?
Hi @hiroshi
So you’re using a single relationship field to create some sort of left to right relation between all your posts?
That’s a creative way to use it I must say 🙂
However I think it’d be hard to do what you ask for. like you’ve noticed if you change the query the non-public posts wont even appear in the field at all.
I think your best solution would be to instead maybe use two different relationship fields and restrict one of them.
Or do a bit of ugly custom Javascript hacking to prevent posts that are non-public to be selectable in the relationship field. But I can’t promise it’s possible and I feel that testing this myself is a bit outside normal forum support 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.