By
07/05/2017   Comments Off on Add post formats to Custom Post Types

View all snippets

Add this to your functions.php file. Make sure your change the prefix name to your own.

// add post-formats to post_type 'my_custom_post_type'

function prefix_custom_post_formats_setup() {
   add_post_type_support( 'my_custom_post_type', 'post-formats' );
}
add_action( 'init', 'prefix_custom_post_formats_setup' );