wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Remove support for specific post type features

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove support for the specific features bellow from specified post types. Change the word ‘post’ to anything you like including a custom post type name or the default post, page.

'title' (Post Title) 'editor' (content) 'author' (Author controls) 'thumbnail' (featured image) (current theme must also support Post Thumbnails) 'excerpt' (Excerpt functionality) 'trackbacks' (Options) 'custom-fields' (Custom Fields) 'comments' (also will see comment count balloon on edit screen) 'revisions' (will store revisions) 'page-attributes' (template and menu order) (hierarchical must be true)
snippet :  PHPcopy
add_action( 'admin_init', 'wps_cpt_support' );
function wps_cpt_support() {
	remove_post_type_support( 'post', 'title' );
	remove_post_type_support( 'post', 'comments' );

Did you like this post? If so please share it with your friends. Thanks!

  • Dan Romanchik

    Is there an equivalent function for removing custom post type fields from an edit screen?