I have a WordPress site that I just updated to 3.1. I want to make use of custom post types now, my question is how can I assign (transfer?) a post to a newly created custom post type ?
For example, all my articles (news, poems, ideas to change the world) are in Posts. Now I have created the custom post types News, Poems, etc. and I want to transfer my old posts to these new custom post types.
I hope this is clear enough, anybody ?
It seems that the easiest way is to do it manually in the DB. If you don’t have access to the DB, or if you don’t want to do it manually, you can install a plugin that will do it one post at a time, or a plugin that will bulk convert a lot of posts at once
there is a great plugin Post Type Switcher
that gives you simple way to change a post type in WordPress.
For those who are looking for a code solution:
You can use “Convert Post Type” to convert from your categories to custom post types that you have already defined.
This plugin will convert all your selected categories to a custom post type that you can choose.
This query will convert all posts to a different post type. You need to make sure that both the previous and new post types share the same categories and taxonomies when you register it with
register_post_type
.You can try this plugin, it simply does the job.