agagnon
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: Post Thumbnail Support for wp_insert_postThanks for the advice. I’ll let you know what I come up with!
Forum: Fixing WordPress
In reply to: Post Thumbnail Support for wp_insert_postThanks a lot for your help.
I’m trying to develop a way for users to add posts from the “front end” of the site. Right now, it’s completely possible, except that they can’t add an image.
I was trying to work around the problem by having them upload an image to the server, then linking the uploaded image url to the post thumbnail data.
I’m not sure how else to go about this since the post thumbnail is fairly new?
Forum: Fixing WordPress
In reply to: Post Thumbnail Support for wp_insert_postGreat! Thanks!
Forum: Fixing WordPress
In reply to: Post Thumbnail Support for wp_insert_postThe function wp_insert_post uses an array to update posts:
$my_post = array(); $my_post['post_title'] = 'My post'; $my_post['post_content'] = 'This is my post.'; $my_post['post_status'] = 'publish'; $my_post['post_author'] = 1; $my_post['post_category'] = array(8,39); wp_insert_post( $my_post );My question is, since there’s a way to update the author, content, category, etc. is there a way to update the post thumbnail?
For instance something like:$my_post['post_thumbnail'] = 'http://www.someurl.com/image.jpg';
Viewing 4 replies - 1 through 4 (of 4 total)