• Resolved jesshearnecreative

    (@jesshearnecreative)


    I am working on a client’s site who already have 4 custom post types from a previous developer (I do not have their details, nor does the client).

    I need to create a fifth post type so installed CPT UI to achieve this as I did not want to dig around in the code to achieve it.

    CPT UI is listing the client’s existing 4 post types as being custom post types, so seems to be working well, but when I select “new post type”, fill in all the information required with labels and slug etc, then press “add post type”, it doesn’t appear in the left hand menu and also doesn’t appear as a custom post type within CPT UI. It’s as though it’s disappeared or wasn’t created in the first please.

    Has it been created at all? If so, where can I find it? Can I add it into the left hand menu so it’s easier to locate in future?

    Thanks!

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

    (@tw2113)

    The BenchPresser

    Best first question I can think of, is what slug are you trying to use for this?

    If you’re filling in just the slug, a plural label, and a singular label, and leaving everything else on defaults, it SHOULD be showing up.

    Alternative question/task would be to visit the Tools menu item, and copy/paste the blob of content on the right hand textarea, as that’ll be our stored settings for this, and we can see if it’s even getting saved somehow.

    Thread Starter jesshearnecreative

    (@jesshearnecreative)

    Thanks for getting back to me so quickly. I’m trying to create a post type called “archive” as I’m creating an archive timeline which I need to have specific post-types for. If the word “archive” causes any trouble, I can try “timeline” instead?

    Here is the text from the right hand side of “tools” as requested:

    {"events":{"name":"events","label":"Our Events","singular_label":"","description":"","public":"1","show_ui":"1","has_archive":"0","exclude_from_search":"0","capability_type":"post","hierarchical":"0","rewrite":"1","rewrite_slug":"","rewrite_withfront":"1","query_var":"1","menu_position":"","show_in_menu":"1","show_in_menu_string":"","menu_icon":"","supports":["title","editor","excerpt","trackbacks","custom-fields","comments","revisions","thumbnail","author","page-attributes","post-formats"],"taxonomies":[],"labels":{"menu_name":"","add_new":"","add_new_item":"","edit":"","edit_item":"","new_item":"","view":"","view_item":"","search_items":"","not_found":"","not_found_in_trash":"","parent":""}},"work":{"name":"work","label":"Our Work","singular_label":"","description":"","public":"1","show_ui":"1","has_archive":"0","exclude_from_search":"0","capability_type":"post","hierarchical":"1","rewrite":"1","rewrite_slug":"","rewrite_withfront":"1","query_var":"1","menu_position":"","show_in_menu":"1","show_in_menu_string":"","menu_icon":"","supports":["title","editor","excerpt","trackbacks","custom-fields","comments","revisions","thumbnail","author","page-attributes","post-formats"],"taxonomies":[],"labels":{"menu_name":"","add_new":"","add_new_item":"","edit":"","edit_item":"","new_item":"","view":"","view_item":"","search_items":"","not_found":"","not_found_in_trash":"","parent":""}},"publications":{"name":"publications","label":"Publications","singular_label":"","description":"","public":"1","show_ui":"1","has_archive":"0","exclude_from_search":"0","capability_type":"post","hierarchical":"0","rewrite":"1","rewrite_slug":"publications","rewrite_withfront":"1","query_var":"1","menu_position":"","show_in_menu":"1","show_in_menu_string":"","menu_icon":"","supports":["title","editor","excerpt","trackbacks","custom-fields","comments","revisions","thumbnail","author","page-attributes","post-formats"],"taxonomies":[],"labels":{"menu_name":"","add_new":"","add_new_item":"","edit":"","edit_item":"","new_item":"","view":"","view_item":"","search_items":"","not_found":"","not_found_in_trash":"","parent":""}},"research_networks":{"name":"research_networks","label":"Research Networks","singular_label":"","description":"","public":"1","show_ui":"1","has_archive":"0","exclude_from_search":"0","capability_type":"post","hierarchical":"0","rewrite":"1","rewrite_slug":"","rewrite_withfront":"1","query_var":"1","menu_position":"","show_in_menu":"1","show_in_menu_string":"","menu_icon":"","supports":["title","editor","excerpt","trackbacks","custom-fields","comments","revisions","thumbnail","author","page-attributes","post-formats"],"taxonomies":[],"labels":{"menu_name":"","add_new":"","add_new_item":"","edit":"","edit_item":"","new_item":"","view":"","view_item":"","search_items":"","not_found":"","not_found_in_trash":"","parent":""}}}

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure what may be going on on still, as I was able to register it just fine in a local install.

    That said, I have an idea. I imported your details above, and then afterwards, I re-registered “archive” as a post type. Below is a link to my blob similar to yours, but with the archive post type saved as well. You should be able to go back to that tools page, and paste the contents into the lefthand side and import the settings.

    https://gist.githubusercontent.com/tw2113/8f23cfee27705c6ccd4682c480efc5af/raw/6bee8e8841541c5242fbb57bccc1c476c8d6a866/gistfile1.txt

    This should hopefully get everything back for you for what you have already, plus this new one. It won’t affect existing content with the post types, just the CPTUI settings.

    Best idea I have for what was going on is perhaps some sort of php/server error, but I have no way to confirm that.

    Thread Starter jesshearnecreative

    (@jesshearnecreative)

    I just tried this and it worked – thank you so much! ??

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome. Glad that worked.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘New custom post type disappearing after clicking “add post type”’ is closed to new replies.