Setting the image size using 'has_post_thumbnail'
-
Hi
I’m wondering if anyone could help, I’m trying to set the image size within my posts proportionally using the following code:
<?php
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘medium’);
echo ‘‘;
echo get_the_post_thumbnail($post->ID, ‘thumbnail’);
echo ‘‘;
}
?>I seem to be either getting really big or quite small, I’ve had a look at the code and tried inputting the pixel dimensions, but with no success. A link to an example is as follows
https://www.jadedeye.com/2011/08/rise-of-the-planet-of-the-apes-review/
Many thanks
J-P
- The topic ‘Setting the image size using 'has_post_thumbnail'’ is closed to new replies.