'lotcost_lot', 'post_status' => 'any', 'posts_per_page' => -1, 'fields' => 'ids', 'no_found_rows' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, ) ); foreach ( $lotcost_lot_ids as $lotcost_lot_id ) { wp_delete_post( (int) $lotcost_lot_id, true ); } delete_option( 'lotcost_settings' ); }