Codex tools: Log in
Languages: English • (Add your language)
Contents |
Registers support of certain feature(s) for a given post type. Each feature has a direct impact on the corresponding field displayed in the post 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 post edit screen.
<?php add_post_type_support( $post_type, $supports ) ?>
To show the "Featured Image" meta box in mulsite installation, make sure you update the allowed upload file types, in Network Admin, Network Admin Settings SubPanel#Upload_Settings, Media upload buttons options. Default is off.
This example adds support for excerpts in Pages (assuming it is *not* showing under "Screen Options"):
<?php
add_action('init', 'my_custom_init');
function my_custom_init() {
add_post_type_support( 'page', 'excerpt' );
}
?>
add_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()