Very simple just add this line to postie-functions.php in your postie plugin directory…
update_post_meta( $post_id, ‘_thumbnail_id’, $id );
around line 1354 (inside function postie_media_handle_upload)
hey – sorry not that hot on php have tried doing this but could you be a little more exact if the original code is:
function postie_handle_upload( &$file, $overrides = false, $time = null, ) {
// The default error handler.
if (! function_exists( 'wp_handle_upload_error' ) ) {
function wp_handle_upload_error( &$file, $message ) {
return array( 'error'=>$message );
}
}
What should it become?
Will this then make attachments featured images but not insert them into posts? Hope so
Thanks
Did anyone figure this out? Been trying to insert the suggested code in different spots in postie-functions.php for the past hour to no avail. Any solution would be GREATLY appreciated. Thanks!
I got it to work and took a screenshot here.
Hope that helps! 🙂
Mike. <><
Can’t get this to work. I placed the exact same code on the exact same place as you showed in the screenshot. But nothing.
not work for me 🙁 i need to add featured image pleaseee
I was able to add a standard featured image to every incoming post by adding this line at the VERY end of the function PostToDB (right before the closing }:
add_post_meta( $post_ID, '_thumbnail_id', 1694 );
where 1694 is the image id…
Hope this helps..
I could fix the problem with the plugin Auto Featured Image.
I hope it will be useful!!