Support

Account

Home Forums Backend Issues (wp-admin) acf/save_post Generating Duplicates Reply To: acf/save_post Generating Duplicates

  • That said, with the exception of the post number jumping by 3, moving the wp_update_post( $my_post ); within each if/else statement; seems to have fixed the initial duplicates issue.

    Actually, that makes sense now that you say it.

    What was happening was that if the post type was not testimonial, client, or project then you were calling wp_update_post() with an empty array, so WP inserted and empty “post”.

    Sometimes it’s easy to overlook the simple things.