Merging two Custom Post Types into one

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);
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)