WordPress at a glance

add_post_type_support() WP 1.0

Register support of certain features for a post type.

All core features are directly associated with a functional area of the edit screen, such as the editor or a meta box. Features include: 'title', 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'.

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.

Is the basis for: create_initial_post_types()
✈ 1 time = 0.000021s = very fast | 50000 times = 0.05s = speed of light

No Hooks.


Null. Nothing.


add_post_type_support( $post_type, $feature );
$post_type(string) (required)
The post type for which to add the feature.
$feature(string/array) (required)
The feature being added, accepts an array of feature strings or a single string.


  • Global. Array. $_wp_post_type_features


Since 3.0.0 Introduced.

Code of add post type support: wp-includes/post.php WP 5.2.4

function add_post_type_support( $post_type, $feature ) {
	global $_wp_post_type_features;

	$features = (array) $feature;
	foreach ( $features as $feature ) {
		if ( func_num_args() == 2 ) {
			$_wp_post_type_features[ $post_type ][ $feature ] = true;
		} else {
			$_wp_post_type_features[ $post_type ][ $feature ] = array_slice( func_get_args(), 2 );

Related Functions

From tag: Custom post type (post_type)

More from category: Custom Types

No comments
    Hello, !     Log In . Register