I am using the Advanced custom fields plugin and Custom post type UI to give my users some extra functionality. The problem I have is that I have setup a users information menu and in the list view all new posts appear as Auto Draft. Is there anyway I can make the field slug company name act as the post title for the list view?.
I tried the below code but it is not updating the company name as post title and in the custom post page it display message like "You are currently editing the page that shows your latest posts."
My Sample code:
add_filter('title_save_pre', 'save_title');
function save_title() {
if ($_POST['post_type'] == 'users') : // my custom post type name
$new_title = $_POST['company_name']; // my custom field name
$my_post_title = $new_title;
endif;
return $my_post_title;
}