Home Forums Backend Issues (wp-admin) Saving Default Value to Custom Fields Reply To: Saving Default Value to Custom Fields

  • What plugin are you using for the JSON API that you mentioned.

    There isn’t any real way to do what you want in ACF unless the API you’re using calls ACF functions. What you need to do is filter the values returned by the JSON API and the best answers for how to do that will come from the documentation and support for that API.

    If you want to update all the existing posts to add new fields and remove old fields then that’s going to be a manual process.

    You will need to 1) Get all the posts that you want to change. 2) Use delete_post_meta() to delete all the ACF content that you no longer want and 3) Use update_post_meta() to add all the new content.

    In steps 2 & 3 don’t forget that you will also need to delete and add the acf field key references.