Home › Forums › General Issues › Allow option only once for posts › Reply To: Allow option only once for posts
I would suggest that rather than having this setting on every post that you instead create an options page that has a post object field to allow for the selection of the default” post.
To do this on every post you will need to create an acf/load_field filter https://www.advancedcustomfields.com/resources/acfload_field/ and do a query in this filter to see if there is another post that already has the value set and if so then disable the field.
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.