I am using "jgrossi/corcel": "3.0.0", Laravel 6.16.0 and PHP 7.4.1
I would like to add a featured image to my saved()-post
I tried to create a wordpress post the following way:
$post = new Post();
$post->post_title = $title;
$post->post_content = $msg;
$post->image = "http://www.urlToImage.com/image.png"; //does not work
$post->save();
When trying the above function I get the following exception:
Column not found: 1054 Unknown column 'image' in 'field list' (SQL: insert into `wp_posts` (`post_title`, `post_content`, `post_type`, `post_status`, `ping_status`, `post_author`, `image`, `post_modified_gmt`, `post_modified`, `post_date_gmt`, `post_date`)
Any suggestions how to save a post and set the featured image?
Appreciate your replies!
i solved it using the following method
to use external url for a post i installed this plugin https://wordpress.org/plugins/external-url-as-post-featured-image-thumbnail/?