CPT doesn’t appear in admin menu
-
Hi,
I’ve created a CPT names “Établissements”.
But even if “show_in_menu” is “TRUE”, my CPT doesn’t appear in my admin menu.
When I create an other CPT it works, but for the CTP named “Etablissements” it’s not.Could you help me ?
The page I need help with: [log in to see the link]
-
Have you done any settings for menu position? It’s possible that it matched up with an already existing item and they’re “clashing” so to speak.
No I don’t.
The CPT’s page works on my site web : https://www.tabledechef.com/wordpress/etabissements/But in backoffice always off…
Can you visit your
Tools > Import/Export
menu item for CPTUI and copy/paste the blob of content on the right hand side of the “Post Types” tab?This will provide me with the settings for all your created post types and I can look over the settings with it. Maybe I’ll see something obvious that got missed.
Here is the code :
{“etablissements”:{“name”:”etablissements”,”label”:”\u00c9tablissements”,”singular_label”:”\u00c9tablissement”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”show_in_rest”:”false”,”rest_base”:”etablissements”,”has_archive”:”false”,”has_archive_string”:”etabissements”,”exclude_from_search”:”false”,”capability_type”:”V\u00e9rification capabilit\u00e9″,”hierarchical”:”false”,”rewrite”:”true”,”rewrite_slug”:”post type slug”,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:””,”show_in_menu”:”true”,”show_in_menu_string”:”\u00c9tablissements”,”menu_icon”:””,”supports”:[“title”,”editor”,”thumbnail”,”custom-fields”],”taxonomies”:[“category”],”labels”:{“menu_name”:”\u00c9tablissements”,”all_items”:”\u00c9tablissements”,”add_new”:”Ajouter nouveau”,”edit_item”:”\u00c9diter \u00c9tablissements”,”new_item”:”Nouvel \u00c9tablissement”,”add_new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””},”custom_supports”:”etablissements”}}
Initial thoughts:
Unless you know for sure you’re editing the capabilities further than just this one part, your “capability type” should be set back to “post”. Chances are that’s the biggest thing holding you up right now. Let WordPress internal handle things.
Other notes.
It appears you may have “post type slug” literally in the rewrite_slug field. Leaving that spot blank will have WP internal use “etablissements” already.
The “custom supports” section doesn’t need that value, and it won’t do anything there. That setting is more for https://docs.pluginize.com/article/28-third-party-support-upon-registration
Thank’s for your answer but even if I did all what you said, nothing works.
I put here the new code after modifications :
{“etablissements”:{“name”:”etablissements”,”label”:”\u00c9tablissements”,”singular_label”:”\u00c9tablissement”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”show_in_rest”:”false”,”rest_base”:””,”has_archive”:”false”,”has_archive_string”:”etabissements”,”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”:”\u00c9tablissements”,”menu_icon”:””,”supports”:[“title”,”editor”,”thumbnail”,”custom-fields”],”taxonomies”:[“category”],”labels”:{“menu_name”:”\u00c9tablissements”,”all_items”:”\u00c9tablissements”,”add_new”:”Ajouter nouveau”,”edit_item”:”\u00c9diter \u00c9tablissements”,”new_item”:”Nouvel \u00c9tablissement”,”add_new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””},”custom_supports”:””}}
I missed one spot. The use of “Établissements” in the “Show In Menu” settings, in the text field right below the dropdown. It was set to a value that WP couldn’t find/determine, thus it simply didn’t get added.
OK ! Yess it’s work now.
Thaaaaannnk’s !I noticed this topic as resolved.
Glad I could clarify some of the settings and help out with this.
- The topic ‘CPT doesn’t appear in admin menu’ is closed to new replies.