Home › Forums › Add-ons › Options Page › Pass Field Value From Options Page to All Posts In a Category › Reply To: Pass Field Value From Options Page to All Posts In a Category
It would be possible, but it would not be efficient.
You would create an acf/save_post action, you would check that the options page is being updated by checking that the post ID = “options”. The you would need to do a WP_Query to get all the post IDs for all of the posts in the category, loop over the list of posts and call the ACF function update_field() for each post.
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.