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 comments
Comments are closed.
You need to set argument
public
to false at register_post_type() function.I did this by removing the
post_row_action
.So, setup a function using that filter:
You will want to add a check to ensure you are on your CPT page when applying this code… otherwise it will remove the ‘view’ button from all post types. You didn’t mention this in your question.. so I can’t make my answer more specific.
If you are not going to view the posts on front-end set publicly_queryable to false
This will make the post updates without any view post link or preview changes button
http://codex.wordpress.org/Function_Reference/register_post_type