Bulk append URL (add word to slug)
Here is your code: if ( isset($_GET[‘slug-update’]) ) { $posts = get_posts(); foreach($posts as $singlepost) { if($singlepost->post_status === ‘publish’){ $post_id = $singlepost->ID; $current_slug = $singlepost->post_name; $updated_slug = $current_slug . ‘-word’; } wp_update_post( array( ‘ID’ => $post_id, ‘post_name’ => $updated_slug ) ); } die(‘Slug Updated’); } Add this to your theme’s function.php. Then run this with … Read more