WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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);
share|improve this answer
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 Aug 5 '12 at 17:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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