Home / admin / Remove support for specific post type features
  • How to Remove support for specific post type features

    remove-support-for-specific-post-type-features

    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)

    wordpress snippet : PHP

    <>
    add_action( 'admin_init', 'wps_cpt_support' );
    function wps_cpt_support() {
    	remove_post_type_support( 'post', 'title' );
    	remove_post_type_support( 'post', 'comments' );
    }
    

    ( WordPress codex functions, hooks, in this snippet. )

    template, init, remove_post_type_support, trackback, add_action, wp,
  • Dan Romanchik

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