Title: auto_update post title
Last modified: August 30, 2016

---

# auto_update post title

 *  Resolved [bbil](https://wordpress.org/support/users/bbil/)
 * (@bbil)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/auto_update-post-title/)
 * hey,I’m new to wordpress, i need help
 * I have create acf field type list, and i want replace or auto_update the title
   of my post type (product) with value of field acf when i save automatically .
 * something like that:
 *     ```
       function my_post_title_updater($post_id) {
   
           if ( get_post_type() == 'product' ) {
             $my_post['post_title'] = get_field('name_field');
   
           }
           // Update the post into the database
           wp_update_post( $my_post );
   
         }
       ```
   

The topic ‘auto_update post title’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [bbil](https://wordpress.org/support/users/bbil/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/auto_update-post-title/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
