Hi Guys
I'm trying to keep all my fields for post creation on the front end as metabox fields (for security and the ability to use conditions etc)
Im using this code to add Test to the Post Title Field and it works great
add_action( 'rwmb_project-core_after_save_post', 'update_post_title' );
function update_post_title( $post_id ) {
// Get the field value
$my_meta = rwmb_meta( 'text_g9i37hn241o', '', $post_id );
// Preprare update post
$my_post = array(
'ID' => $post_id,
'post_title' => $my_meta,
);
wp_update_post( $my_post );
}
How would I go about setting the thumbnail using a Metabox Single Image Upload field?
Many thanks again in advance!