Add post formats to the $post array

Given an array of post data to insert or update, it is easy to add a Post Format to the taxonomy array (similar to the `category` or `post_tag` data). The following assignments can be using in a conditional statement to automatically attach a Post Format to a saving post.

Make sure that the `post_format` taxonomy has been set up with `add_theme_support( ‘post_formats’ , array() ) `.

Leave a Reply