Languages: English • Italiano • 日本語 (Add your language)
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.
<?php remove_post_type_support( $post_type, $supports ) ?>
This example removes support for excerpts in posts:
add_action( 'init', 'my_custom_init' ); function my_custom_init() { remove_post_type_support( 'post', 'excerpt' ); }
This example removes support for post formats in posts:
add_action( 'init', 'my_remove_post_type_support', 10 ); function my_remove_post_type_support() { remove_post_type_support( 'post', 'post-formats' ); }
remove_post_type_support() is located in wp-includes/post.php
.
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()