I created some custom post types, but I would like to hide them in the dashboard from Subscribers, Authors, and Editors (essentially, just allow administrators to access them).
Can I do this without installing a plugin?
|
I created some custom post types, but I would like to hide them in the dashboard from Subscribers, Authors, and Editors (essentially, just allow administrators to access them). Can I do this without installing a plugin? |
||||
|
|
|
I'm sure you could specify some capabilities while registering the Post Type itself. Although, here is a more robust version that can be used widely across the administration dashboard.
In order to fire the function, you must add the action.
|
|||||||||||
|