Is it possible to hide the ability to view or preview custom post types? I as, for custom post types like carousels and other forms that render in a particular way where viewing or previewing them out side their intended rendering purpose would not make any sense.
3 s
You need to set argument public
to false at register_post_type() function.
Whether a post type is intended to be used publicly either via the
admin interface or by front-end users. Default: false
- ‘false’ – Post type is not intended to be used publicly and should generally be unavailable in wp-admin and on the front end unless
explicitly planned for elsewhere.- ‘true’ – Post type is intended for public use. This includes on the front end and in wp-admin.