I need to change several hundred posts with custom post types to regular post type but only from one category within that custom post type.
So I have a custom post type 'films' and within that post type I have a couple dozen categories. What I would like to do is change all posts from custom post type 'films' that also have the category 'directors' to the standard post type without affecting other 'film' posts that do not have the category 'directors'.
I've searched around and have found a way to successfully change all posts within a post type using the query below but I need to be more specific.
UPDATE `wp_posts`
SET `post_type` = '<new post type name>'
WHERE `post_type` = '<old post type name>';
I've also tried using plugins such as 'Convert Post Types' but unfortunately they do not pull in categories from custom post types.
I've read a good deal of documentation on this but I'm totally new to this kind of work so I'm having a hard time wrapping my head around some of the syntax.