I am using built-in
Wordpress function to add (small) thumbnails to each post. In addition to the post thumbnail I am using MultiPostThumbnail plugin to add custom category (large) image.
Since not all posts have thumbnails or "secondary image" (as it is called by MultiPostThumbnail plugin) I would like to display thumbnails (either large or small) in this order:
If I a post has large (MultiPostThumbnails) thumbnail and (small) thumbnail display only (large) thumbnail.
If a post doesn't have a (large) thumbnail display the (small) thumbnail.
I hope now it makes more sense. It's a simple if statement but I can't get it to work. Here is a "pseudo-code".
<?php if (class_exists('MultiPostThumbnails')
&& MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :
MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image', NULL, 'post-secondary-image-thumbnail');
else {
the_post_thumbnail();
}
?>