I am also very interested in a way to use get_the_post_image() or get_the_post_thumbnail() or something similar for a secondary thumbnail.
There is a get_the_post_thumbnail() function built into this plug-in. Following is its usage:
MultiPostThumbnails::get_the_post_thumbnail( $post_type, 'secondary-image', $postID, $size, $attr, $link_to_original )
The parameters are as follows:
- Post type – the type of post for which the thumbnail was created (you can usually just use $post->post_type for this, I think).
- Thumbnail registration ID – the ID you assigned to this particular type of secondary image (in all of the examples that come with the plug-in, this is set to ‘secondary-image’, but you can set it to whatever you want).
- Post ID – The WordPress ID of the post/page to which this image is attached (you can usually just use $post->ID for this).
- Size – the name of the thumbnail size you want to retrieve (thumb, medium, large, original, etc.)
- Attributes – The same as the “attr” variable used in the regular WordPress get_the_post_thumbnail() function.
- Link to original? – Whether or not to wrap the thumbnail with a link to the original (full-sized) image.
brilliant! thanks for the reply!