Home › Forums › Backend Issues (wp-admin) › Set WordPress excerpt and post thumbnail based on custom field › Reply To: Set WordPress excerpt and post thumbnail based on custom field
ACF uses a Priority of 10 to do it’s own work on the acf/save_post hook.
If you use a priority < 10 then your action will run before ACF. The values in the database will be the previous values and using
get_field() at this point will return then previous values and not the new values that need to be saved.
If you use a priority > 10 then your action will run after ACF has saved the new values to the DB. Using get
get_field() here will return the newly saved values.
$_POST value that you should be looking at depends on what version of ACF you are using.
In ACF5 it is
In ACF4 you need to look at
The nested index of the array for each field is the field key. For example
] These values are the same no matter what priority you use for your action.
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!