Removes support for a feature from a post type.
$post_typestringrequired
$featurestringrequired
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.
Possible values of parameter $feature
function remove_post_type_support( $post_type, $feature ) {
global $_wp_post_type_features;
unset( $_wp_post_type_features[ $post_type ][ $feature ] );
}
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/remove_post_type_support