upload featured image from front end using wordpress add media button April 25, 2022 by Tarik Billa add below code after echo $attach_id.... set_post_thumbnail( $post_id , $attach_id);