How to set custom post type field as post title to avoid ‘Auto Draft’

I have a custom post type called artists, I combine the artist acf field of first_name and last_name and set that as the title.  // Auto-populate artist post type title with ACF first name last name. function nd_update_postdata( $value, $post_id, $field ) { // If this isn't an 'artists' post type, don't update it. if ( get_post_type( $post_id ) == 'artists' ) { $first_name = get_field('first_name', $post_id); $last_name = get_field('last_name', $post_id); $title = $first_name . ' ' . $last_name; $slug = sanitize_title( $title ); $postdata = array( 'ID' => $post_id, 'post_title' => $title, 'post_type' => 'artists', 'post_name' => $slug );...

Generate Post Title and Slug from Advanced Custom Fields

I often need to create post titles in WordPress based on fields I’ve generated using Advanced Custom Fields. Below is an example that assumes we have a Custom Post Type registered to “staff” and two Custom Fields with the name of “first_name” and “last_name”. Using the “update_value” hook provided by Advanced Custom Fields and “wp_update_post” I am able to update the Slug and Post Title using the values given in the respective fields. <?php /** Create Title and Slug */ function acf_title( $value, $post_id, $field ) { if ( get_post_type( $post_id ) === 'staff' ) { $new_title = get_field( 'first_name',...

Showing an ACF field in admin posts dashboard

function custom_columns( $columns ) { $columns = array( 'cb' => '<input type="checkbox" />', 'title' => 'Title', 'featured_image' => 'Image', 'categories' => 'Categories', 'amazon_url' => 'Amazon Link', 'comments' => '<span class="vers"><div title="Comments" class="comment-grey-bubble"></div></span>', 'date' => 'Date' ); return $columns; } add_filter('manage_posts_columns' , 'custom_columns'); function custom_columns_data( $column, $post_id ) { switch ( $column ) { case 'featured_image': the_post_thumbnail( 'thumbnail' ); break; case 'amazon_url' : echo get_field( 'product_url', $post_id ); break; } } add_action( 'manage_posts_custom_column' , 'custom_columns_data', 10, 2 ); https://wordpress.stackexchange.com/questions/313315/showing-an-acf-field-in-admin-posts-dashboard