Title: Save Post Format
Last modified: April 4, 2018

---

# Save Post Format

 *  [celsowhite](https://wordpress.org/support/users/celsowhite/)
 * (@celsowhite)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/save-post-format/)
 * Incredible plugin. I noticed there is no ‘post_format’ field for CSV’s. You can
   use the below code to add a post format to posts after they have been processed
   by the plugin.
 * \`php
    add_filter( ‘really_simple_csv_importer_post_saved’, function($post) {
 *  // Checks if the post category is video (this can be any category you choose.)
   Or any
    // conditional.
 *  $first_category_slug = get_the_category($post->ID)[0]->slug;
 *  if($first_category_slug === ‘video’) {
    // Use WP set_post_format method. set_post_format(
   $post->ID, ‘video’); }
 * }, 10, 1 );
    `

The topic ‘Save Post Format’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/really-simple-csv-importer_c5cdac.
   svg)
 * [Really Simple CSV Importer](https://wordpress.org/plugins/really-simple-csv-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-csv-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-csv-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-csv-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-csv-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-csv-importer/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [celsowhite](https://wordpress.org/support/users/celsowhite/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/save-post-format/)
 * Status: not resolved