Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unless you have js console errors going on or js disabled, it should have prompted you if you wanted to for sure.

    That said, best I can offer is fetching the CPTUI saved values from a backup(it’ll be in the wp_options table) or simply recreate the settings from memory. You’re right that the posts for the post type aren’t deleted at all. We leave that up to the user to handle.

    Thread Starter stuartborders

    (@stuartborders)

    I don’t have any JS errors, double checked.

    Im looking in the wp_options table for my other post type to recreate the lost one from, but can’t locate values for it there. All I can find are widgets I have setup for the sidebar I am using on the archive for that post type. What should I be looking for if my “still live” post type name is Recipes?

    Thread Starter stuartborders

    (@stuartborders)

    I wasn’t super far into it, only a few posts. So what could I do to delete any information that would allow me to remake the slug “Press”? Would the old posts then show up if I rebuilt the post type in the UI with the same name/values? even if they wouldn’t I want to use that slug. Can I do that?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    We store the plugin’s settings in option keys of cptui_post_types and cptui_taxonomies if I recall right, Both are arrays of post types or taxonomies registered, with the post type slug being a key and the value being all the settings chosen for that type or tax. All of the actual content created for them are stored in their appropriate tables just like posts and pages and post types not registered through us.

    So if you were planning to get the post type back via a backup of the database, you’d want to check the backup’s wp_options table and locate that option key.

    If you’re going the route of rebuilding, since you say you weren’t that far along, re-using the same slug would once again register a post type with that one, and all of the posts would once again be associated with it. Only thing you’d need to consider is any settings for the post type that you intently set, as opposed to perhaps relying on defaults. Biggest ones I can think of would be like hierarchical for parent/child relationships or has archives, or public in general.

    Long story short regarding rebuilding, it should be really easy to get back up and going. As easy as just using the previous slug again.

    Thread Starter stuartborders

    (@stuartborders)

    When i try to enter it again it says the slug already exists. Where do I need to edit the database to clear up the slug, so i can recreate it. Really the only thing custom other than the slug and the two labels was the icon. So it should be super easy to rebuild. Just the UI won’t let me because it shows the slug still taken.

    Thread Starter stuartborders

    (@stuartborders)

    thanks for all of the help by the way!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If it’s giving you that error, then it’s still either present in the CPTUI settings, or is somehow registered somewhere else in the execution of the loading of the site.

    Did you maybe register it via functions.php to do some testing for something?

    The import/export area would provide some information of what’s stored in the settings at the present moment as well.

    Thread Starter stuartborders

    (@stuartborders)

    I didn’t register it anywhere else except through CPTUI. It was there and working great till I clicked delete.

    Ok So in the export feature I just see the other post type, Recipes. Can I copy this, duplicate it and change the name values to Press rather than Recipes? Does a comma separate theme? {“recipes”: {settings data}, “press”:{settings data}} like that?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yes, that looks correct.

    Still not sure why it’s giving you the duplicate slug error at this point, unless some other plugin is registering the same slug and you’re simply not aware of it.

    Thread Starter stuartborders

    (@stuartborders)

    YEAH! that worked. It was weird. After the import, it saw it as an option in the “Edit” area, but the fields were blank. So I added them back as they were before (and in the array) and clicked Save. Everything was there and ready!

    Thank you SOOOOO much for the support! I really appreciate it.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Very odd, but glad o hear things are worked out in the end.

    Have a good rest of the day Stuart.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Accidentally Deleted Post Type’ is closed to new replies.