Place this code in functions.php of your wp current theme:
1 2 3 4 5 6 7 8 9 10 | <?php $args = array('post_type' => 'WRITE-OLD-SLUG-HERE', 'numberposts' => -1); $posts = get_posts($args); if (!empty($posts)) { global $wpdb; foreach ($posts as $key => $post) { $wpdb->query("UPDATE {$wpdb->posts} SET post_type = 'WRITE-NEW-SLUG-HERE' WHERE ID = {$post->ID}"); } } ?> |
Replace all WRITE-OLD-SLUG-HERE and WRITE-NEW-SLUG-HERE to slugs you need then refresh home page of your site. After page refreshing remove the script from functions.php file.
That is all.
