Title: wp_insert_post_data empty post_title
Last modified: August 22, 2016

---

# wp_insert_post_data empty post_title

 *  [rodrigues.will92](https://wordpress.org/support/users/rodrigueswill92/)
 * (@rodrigueswill92)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/wp_insert_post_data-empty-post_title/)
 * Hi, I need to create posts with automatic title.
    I found this solution:
 *     ```
       add_filter( 'wp_insert_post_data', 'wpse_update_post_title_and_slug' );
       function wpse_update_post_title_and_slug( $data ) {
           if( 'estate_property' == $data['post_type'] ) {
               //Add post meta to post title
               $data['post_title'] = 'E'.$_POST['ID'];
           }
           return $data;
       }
       ```
   
 * When I create a post, the post title is automatically generated and is displayed
   in the title field.
    But when I check the database, in wp_posts table the post_title
   field is correctly filled , but in wp_postmeta table the post_title field appears
   empty. Any idea why?

The topic ‘wp_insert_post_data empty post_title’ is closed to new replies.

## Tags

 * [save_post](https://wordpress.org/support/topic-tag/save_post/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [rodrigues.will92](https://wordpress.org/support/users/rodrigueswill92/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/wp_insert_post_data-empty-post_title/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
