Support

Account

Home Forums Backend Issues (wp-admin) Why doesn't this work on acf/save_post when attaching gallery ids? Reply To: Why doesn't this work on acf/save_post when attaching gallery ids?

  • Does the field with the key field_63a6bd5d2a3d2 actually exist on the page/post that is being submitted?

    Assuming this is the case.

    Your save_post action has a priority of 1. ACF runs on the save_post hook with a priority of 10. Your action is running before ACF saves field values. When ACF saves the field values it updates the same field with whatever was submitted in the form, overwriting what you did.

    This is why it is important to use the acf/save_post hook instead of the standard save_post hook with the correct priority to run either before or after ACF has saved values.