delete_post_meta() for whole CPT / multiple posts?
The Core lacks a function for that kind of bulk delete, so far as I know. The safest thing to do is to Loop over the posts in your CPT and delete the fields. $del = array( ‘list’, ‘of’, ‘keys’, ‘to’, ‘delete’ ); $args = array( ‘post_type’ => ‘book’, ‘posts_per_page’ => -1, ‘ignore_sticky_posts’ => true, … Read more