Every time I create a custom post type, the label never shows on the left admin panel, However, they do show when you click on manage post type.. Not sure what is going on.
4 comments
Comments are closed.
Every time I create a custom post type, the label never shows on the left admin panel, However, they do show when you click on manage post type.. Not sure what is going on.
Comments are closed.
Please check what the value of the
show_in_menu
andshow_ui
arguments for register_post_type your post types before you register tham.Sometimes this can be caused by the
menu_position
clashing with another menu position, or perhaps being hidden away by some other plugin. Try changing that value.Hi I Have Some Idea Add I Also Create Custom Post Type You Need
Custome Post Type You Follow This Code It’s Work for me.
This code carefully use Services => is my custom Post Type e-education => is my ‘text-domain’ you replace and Use
This is a very old Q&A but I just resolved this by ensuring that
register_post_type
is invoked in a callback on action ‘init’, not ‘admin_init’.I was thinking that since I would only want my CPT maintenance to be visible to admins that I should setup on admin_init. I believe the proper way to see this is that CPT dashboard menus are generated on ‘init’, and to limit the visibility, use capabilities. That is, set capabilities on the CPT and add capabilities to roles which are assigned to users. See this other SE Q&A on that topic.
You don’t want to avoid the registration code using is_admin. It’s more likely that a CPT should always be defined for all users, and that we just want to restrict visibility and maintenance rights to specific users (via their capabilities).