Closed markdalderup closed 9 years ago
You need to use the image size as a string as the 4th argument to MultiPostThumbnails::the_post_thumbnail()
. The third argument is the post ID but if you're using this in the loop you can pass in null
or use get_the_ID()
for that. So, it would look something like:
<?php if (class_exists('MultiPostThumbnails')) :
MultiPostThumbnails::the_post_thumbnail(
get_post_type(),
'image2',
null,
'medium'
);
endif; ?>
Thanks , that did the trick. I thought I tried that variation . but I probably misplaced a comma or something
Hi,
How do I display different image sizes of the multiple images with MultiPostThumbnails::the_post_thumbnail.
I tried the following but it doesn't work.
I just need the right syntax I think or does size only work with get_the_post_thumbnail()?, because when I use that it returns nothing.
Thanks for your time