Plaats deze code in functies.php van uw huidige wp-thema:
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}"); } } ?> |
Vervang alles SCHRIJVEN-OUDE-SLUG-HIER en SCHRIJVEN-NIEUW-SLUG-HIER naar naaktslakken die u nodig heeft, vernieuw dan de startpagina van uw site. Na het vernieuwen van de pagina verwijdert u het script uit het bestand function.php.
Dat is alles.