Closed haabe closed 10 years ago
The meta key gets built (code) using the post_type
and id
array values used to register the thumbnail. So, for the 'post' post type and an id of 'secondary-image' the meta key would be post_secondary-image_thumbnail_id
and would be the meta key you can pass in to your call along with the image ID to be the thumbnail.
I just learned that I need to migrate data from an old sql database to a WP publication. The publication uses multi-post-thumbnails, and I need to direct the image data to the corresponding fields in the posts.
Adding an ordinary thumbnail using post_thumbnail in wp.newPost is easy, but how do I add a multi-post-thumbnail?
I tried 'post_customfields' => array( 'post[field-name]_thumbnail' => $imageid ) but that was obviously wrong.