• Resolved elemenope

    (@elemenope)


    Hi guys

    I’ve installed Custom Post Type UI and made some testings with different Post Types.
    After that, I would like to delete some of the Post Types. Deleting Post Types seems to be more difficult than expected. While the regualar way doesn’t work and generates the following error: “Please select a post type to select”, I found an instruction that I can’t follow. It’s about using the import/export function to get rid of post type names with a space in the post type name.

    I tried it to delete with: CPT UI / Edit Post Types / Delete Post Type” and get the error “Please select a post type to select”

    Could anybody help me further?

    Thanks in advance
    elemenope

    https://ww.wp.xz.cn/plugins/custom-post-type-ui/

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

    (@tw2113)

    The BenchPresser

    I’m guessing you have spaces in your post type slugs, am I correct?

    If so, the easiest way to amend this is the import/export page. Simply copy and paste the right half into the left half. Once done, find the spot with the space, and replace with an underscore, and click import.

    That should re-import everything as is, with the exception of the changed space, and you can delete afterwards.

    If you’d prefer, I would be willing to make the change for you, I would just need the export value from that page and be told which need to be updated.

    Let me know.

    Thread Starter elemenope

    (@elemenope)

    Hi Michael

    No, I have no spaces in the post type slug, (as far as I know). It would be great, if you could have a look on it. What exactly do you need for that?

    Thanks
    elemenope

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    use the debug tab in the import/export page to send me your CPTUI details. Should be able to just provide my email and it’ll send to me.

    Use michael @ webdevstudios dot com

    Let me know when you have triggered this so I know when to begin expecting it.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Aha. Special characters were getting us in this case. Forgive me for not knowing the proper term for them, but the dots above some of the characters.

    I have some open issues on GitHub regarding this, but don’t have a solution yet, because I don’t want to be breaking existing sites that may have them and are not experiencing issues.

    I’d avoid using them in the post slugs from here on out, but labels are fine still.

    For what it’s worth, here’s the JSON that you can use to import just the portfolio post type into your site. The other 3 will be removed for you.

    {"portfolio":{"name":"portfolio","label":"Bildbeitr\u00e4ge","singular_label":"Bildbeitrag","description":"Bildbeitrag","public":"true","show_ui":"true","show_in_nav_menus":"true","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","trackbacks","thumbnail"],"taxonomies":["category","post_tag"],"labels":{"menu_name":"Bildbeitr\u00e4ge","all_items":"Bildbeitr\u00e4ge anzeigen","add_new":"Hinzuf\u00fcgen","add_new_item":"Neuen Bildbeitrag hinzuf\u00fcgen","edit":"Bearbeiten","edit_item":"Bildbeitrag bearbeiten","new_item":"Neuer Bildbeitrag","view":"Anzeigen","view_item":"Bildbeitrag anzeigen","search_items":"Bildbeitrag suchen","not_found":"Keine Bildbeitr\u00e4ge gefunden","not_found_in_trash":"Keine Bildbeitr\u00e4ge im Papierkorb gefunden","parent":"\u00dcbergeordneter Bildbeitrag"},"custom_supports":""}}
    Thread Starter elemenope

    (@elemenope)

    It works great. Thank you for your help!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome.

    Another for what it’s worth CPTUI 1.3.0, as of last night, is going to have a “low level” prevention of accented characters in the slug field only. Labels will be fine, but slugs will get converted to corresponding latin characters. Same thing is going to happen for spaces which will be converted to underscores. It’ll save a lot of headaches.

    Thread Starter elemenope

    (@elemenope)

    Ok, thanks.

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

The topic ‘Deleting Custom Post Types’ is closed to new replies.