I am new to all this so my ignorance may get in the way.

I inherited a WP Blog with Custom Post Types. There are 4 Custom Post Types, out of which 2, Books and Magazines, have the same fields: Custom_Post_Type_Name, Author, City, Address, Categories, Tags, Date.

I need to merge these two Custom Post Types into one. More specifically, I need to merge Books into Magazines and rename this new merged Custom Post Type to Publications.

Can someone please show me how to do this?

1 Answer 1


You can ran a simple query once and remove it from your code, something like this:

if (!get_option('updated_my_books')){
    global $wpdb;
    $wpdb->query("UPDATE $wpdb->posts SET post_type = 'publications' WHERE post_type IN('books','magazines')");
    update_option('updated_my_books', true);
  • Hi Bainternet. Thanx for the response. Will this also remove the links on the Admin Panel...??? Also, now would the new name "Publications" show up in the Control Panel...??
    – Runa Chow
    Commented Aug 5, 2012 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.