set featured image for WordPress post via XML-RPC

About 6 months ago there was an update to the WordPress API which allows setting a post's thumbnail (or featured) image.

I'm trying to use it but it's not working for me. I'd like to know what I may be doing wrong. I'm calling the XML-RPC newPost method to create a post and passing the Media ID of an existing asset in the media library (known as the attachment_id in the media library) The new post is being created and all the other properties are being set, except for the featured image.

I verified my version of the wordpress api, and sure enough in class-wp-xmlrpc-server.php I see the comment in the new post function section: "* post_thumbnail - ID of a media item to use as the post thumbnail/featured image"

All the other properties are working. I can add new images to the media library via XML-RPC. I can create and update posts and set their tags, titles, descriptions, custom field values, and categories. I don't get any errors when I try to set the post_thumbnail value. Even if I pass in a non-existent media id, which seems odd.


arrrg! this WP version 3.4 ticket is misleading!

it's "wp_post_thumbnail" not "post_thumbnail"

Need Your Help

When changing textview, the text on a button below the textview moves down. Help!

android android-layout

Pretty much I have a Textview that is acting as a display for asterisks when a user clicks a pin pad of Buttons I made.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.