Hi I would like to seek advice as I lost some of the custom content (Only left with the default title and text box) when I changed the slug of a Post. I have recreated a new Post with the old name but it did not retrieve the content. How do I retrieve back the content with a new slug & title?
To be certain, this is happening when you’re editing posts from the post type that you created with CPTUI? Or are you editing the post types that you’re registering?
For example, with a post type of movie, you have a permalink of mysite.com/movie/aliens/
You’re changing the aliens portion to something else and losing things? or the movie portion to say film?
Editing the aliens portion from my example shouldn’t be losing you post content and the like. Editing the movie portion would effectively be registering a new post type, unless you’re using the “migrate posts” bit of UI to move the posts to the new post type as well.
I intend to change the slug ‘movie’ to ‘film’. I’m unsure what ‘migrate posts’ does, but that cause the content to go missing. Is there any way I could solve it?
Basically since you’re changing the post type slug, and you want to retain the posts into the new slug, you’ll want to use the migrate part too. With that checked, we do an update of all the associated posts in the table to move them to the renamed slug. Should be all completely seamless and whatnot, but never hurts to run a quick backup just in case.