Languages: English • Italiano • 日本語 (Add your language)
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 /** * Enables the Excerpt meta box in Page edit screen. */ function wpcodex_add_excerpt_support_for_pages() { add_post_type_support( 'page', 'excerpt' ); } add_action( 'init', 'wpcodex_add_excerpt_support_for_pages' ); ?>
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()