'headfoot_template', 'post_status' => 'any', 'posts_per_page' => -1, 'fields' => 'ids', 'no_found_rows' => true, ] ); foreach ( $headfoot_ids as $headfoot_id ) { wp_delete_post( $headfoot_id, true ); } delete_option( 'headfoot_settings' ); $headfoot_cpt_support = get_option( 'elementor_cpt_support' ); if ( is_array( $headfoot_cpt_support ) ) { $headfoot_cpt_support = array_values( array_diff( $headfoot_cpt_support, [ 'headfoot_template' ] ) ); update_option( 'elementor_cpt_support', $headfoot_cpt_support ); }