• Resolved anonymized-21067440

    (@anonymized-21067440)


    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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter anonymized-21067440

    (@anonymized-21067440)

    Hi
    I have just retrieved the content, however how can I change the CPT UI page title and slug without causing the same issue?

    Below, it specifies not to edit the post type slug.


    Slugs may only contain lowercase alphanumeric characters, dashes, and underscores.

    DO NOT EDIT the post type slug unless also planning to migrate posts. Changing the slug registers a new post type entry.

    Migrate posts to newly renamed post type?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    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.

    Thread Starter anonymized-21067440

    (@anonymized-21067440)

    Hi
    Thank you for your reply.

    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?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    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.

    Thread Starter anonymized-21067440

    (@anonymized-21067440)

    Thank you. It is fixed now. It just happen to work after migrating the page again.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Good to hear things worked out in the end.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Custom content missing’ is closed to new replies.