Support

Account

Home Forums Backend Issues (wp-admin) Set image as featured image Reply To: Set image as featured image

  • Hi!

    I think you could do something like this:

    
    add_post_meta($post_id, '_thumbnail_id', $attachment_id);
    

    since the posts featured image is really just a meta value (of course the actual image has to be uploaded and have its own “post” in wp_posts)