Codex

Function Reference/remove post type support

Contents

Description

Remove support of certain features for a given post type (s). All features are directly associated with a functional area of the edit screen, such as the editor or a meta box. Additionally, the 'revisions' feature dictates whether the post type will store revisions, and the 'comments' feature dictates whether the comments count will show on the edit screen.

Typically remove_post_type_support() should be attached to the 'init' action hook.

Usage

<?php remove_post_type_support$post_type$supports ?>

Parameters

$post_type
(string) (required) Post type. (max. 20 characters)
Default: None
$supports
(string) (required) Feature to remove.
Default: None
  • 'title'
  • 'editor' (content)
  • 'author'
  • 'thumbnail' (featured image) (current theme must also support Post Thumbnails)
  • 'excerpt'
  • 'trackbacks'
  • '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)

Example

This example removes support for excerpts in posts:

<?php
	add_action('init', 'my_custom_init');

	function my_custom_init() {
		remove_post_type_support( 'post', 'excerpt' );
	}
?>

Change Log

Source File

remove_post_type_support() is located in wp-includes/post.php.

Related

Post Types: register_post_type(), add_post_type_support(), remove_post_type_support(), post_type_supports(), post_type_exists(), set_post_type(), get_post_type(), get_post_types(), get_post_type_object(), get_post_type_capabilities(), get_post_type_labels(), is_post_type_hierarchical(), is_post_type_archive(), post_type_archive_title()

See also index of Function Reference and index of Template Tags.