Custom Post Type names filter

This topic contains 4 replies, has 2 voices, and was last updated by  purpleedge 9 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #9341

    purpleedge
    Expired Member
    Post count: 539

    I created a new custom post type and I called it gd_dining this creates a cpt called gd_gd_dining which shows up in the widgets as “gd_”

    I couldn’t figure out how to rename it to “dining” – tried and failed to edit the database, so I deleted it and got this rather confusing message…

    “If you have create (gd_gd_dining) same name post type than all its data are assing to new post type. If no, click on delete link to delete all related data to this post type (gd_gd_dining). Delete”

    Two suggestions:

    1. Maybe you can filter out, or warn about, non alpha characters when creating CPT names?
    2. Maybe you can rewrite the above message?

    JAT, I’ve learned my lesson. 🙂

    #9342

    Vikas
    Full Member
    Post count: 1128

    Sorry for this wrong message. I will write correct message in next release.

    Thanks

    #9343

    purpleedge
    Expired Member
    Post count: 539

    Thanks Vikas, I just discovered that there is a filter for uppercase letters when creating a new CPT, but if there is an underscore in the name the View Posts Widget only displays the characters up to the underscore, which might cause problems. So you might want to have a look at that too?

    #9346

    Vikas
    Full Member
    Post count: 1128

    Next time this message will say something like this.

    ‘Click to Delete all posts of (gd_gd_dining) post type. If you don’t delete posts of this post type now and create a same name post types in future then all the posts will be assigned to (gd_gd_dining) post type again.’

    Thanks for spotting my mistake.

    #9348

    purpleedge
    Expired Member
    Post count: 539

    I deleted gd_gd_dining CPT, after deleting the listings I had created for it. I also chose the “delete” link above.

    But unfortunately it has broken the WP menu and I can’t access the menu editor any more.

    Values for gd_gd_dining were still left in “options”, “postmeta” and “term_taxonomy” tables.

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket