I have a custom Post Type which is not using any of WP builtin supports (like 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'). Instead I am using my own metaboxes to publish the CPT. Now after creating the CPT and publishing when I click on the View Post it navigates to a URL ending with auto-draft and on second CPT to auto-draft-2 and so on
http://localhost/movies/auto-draft/
As you noticed this is still navigating to post default title instead of Post Custom Meta box. How can I update this to use an specific metabox, such as $name
?
$we_movieMetas = get_post_custom( $post->ID );
$name = isset( $we_movieMetas['name_box'] ) ? esc_attr( $we_movieMetas['name_box'][0] ) : '';
$boxOffice = isset( $we_movieMetas['boxOffice_box'] ) ? esc_attr( $we_movieMetas['boxOffice_box'][0] ) : '';