Software Developer

Add Post Formats Support To Custom Post Types, Pages, or Posts

Add theme support for post formats in WordPress to regular posts like this:

add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) );

Add theme support for post formats to pages :

add_post_type_support( 'page', 'post-formats' );

Add theme support for post formats to custom post types:


$args = array(
  ...
  // your own custom args, then for 'supports', include 'post-formats'
  'supports' => array('title', 'editor', 'author', 'post-formats')
); 
register_post_type('your_custom_posttype', $args);

By

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]