• Hi I’m using this plugin and set a new image size in the functions.php and set cropping to TRUE. However on my post page the image is not being cropped but displaying at its full size. This is when using the code for multiple image thumbnails.

    Here is the code I have in functions.php

    /* Add new thumbnail size */
    add_image_size( 'single-post-thumbnail', 620, 250, true ); // Full image used on single post template (post.php)
    
    /* Add secondary thumbnail (featured image) in posts */
    $thumb = new MultiPostThumbnails(array(
        'label' => 'Secondary Image',
        'id' => 'secondary-image',
        'post_type' => 'post'
        )
    )

    and in my post.php:

    if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :
    	MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image', NULL, 'single-post-thumnail');
    endif;

    How can I fix this problem? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chris Scott

    (@chrisscott)

    That all looks OK. Using that same code I get an img tag that looks like the cropping is working:

    <img height="250" width="620" title="photo-1" alt="photo-1" class="attachment-single-post-thumbnail" src="http://trunk.localhost.localdomain/wp-content/uploads/2010/09/photo-1-620x250.jpg">

    Thread Starter alfie

    (@drtanz)

    Stange how it’s not working for me then, you can see an example here:
    http://bit.ly/idUKoy

    Thread Starter alfie

    (@drtanz)

    any idea what else I can change in order to fix this?

    Thread Starter alfie

    (@drtanz)

    any help pls?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Multiple Post Thumbnails] Image cropping not working’ is closed to new replies.