Home Forums General Issues Flush Unused Custom Fields Reply To: Flush Unused Custom Fields

  • No, there really is no solution and I doubt there ever will be. There really isn’t a safe way to delete all of the data for a field if a field is deleted. The solution that I posted will work if you are extremely careful about never creating 2 fields with the same name.

    There isn’t a safe way to generically remove unnecessary field values when a post is updated. This is something that you need to decide to do and create a custom solution that works for your needs and use the acf/save_post hook to create a filter.