• Hanskuh

    (@hanskuh)


    Hello,

    I would like to show the cropped thumbnail from an image wich I have uploaded using a custom field. Currentyl I am using this code, but the images are being stretched using this. Is there a way to displey the thumbnail that was generated by WordPress?

    <?php $foto_1 = get_post_meta($post->ID, 'foto_1', true);
    if ($foto_1) {
    
    ?>
    
    <a title="<?php the_title(); ?> - <?php $values = get_post_custom_values("park"); echo $values[0]; ?>" href="<?php the_field('foto_1'); ?>" rel="prettyPhoto-img[1]"><img class="post_thumbnail alignleft" alt="<?php the_title(); ?> - <?php $values = get_post_custom_values("park"); echo $values[0]; ?>" img src="<?php the_field('foto_1'); ?>" width="95" height="95" /></a>
    
    <?php } else { ?><?php } ?>
  • The topic ‘Insert thumbnail from image in custom field?’ is closed to new replies.