Home › Forums › Backend Issues (wp-admin) › how to recalculate the value of the coefficient field automatically? › Reply To: how to recalculate the value of the coefficient field automatically?
The only way to update the value in all posts is to do a query to get all of the posts and loop over them and set the new value for each post in the loop.
Depending on the number of posts you have this could potentially just time out and fail.
Is it necessary to actually store the calculated value? Why are you storing a calculated value? Not saying you don’t need to store the value, I just want to understand why it’s needed and that might provide ideas on how to work around the limits.
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.