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.