Function Reference/post type supports
Description
Checks a post type's support for a given feature.
Usage
<?php post_type_supports( $post_type, $supports ); ?>
Parameters
- $post_type
- (string) (required) Post type. (max. 20 characters)
- Default: None
- $supports
- (string) (required) Feature(s) to make available
- 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)
Return Values
- (boolean)
- True on success, false on failure.
Change Log
Source File
post_type_supports() 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()