• Resolved lizzmo

    (@lizzmo)


    Here is the code I’m using:

    <?php if (has_post_thumbnail( $post->ID ) ): ?>
    <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail', $size='thumbnail' ); ?>

    I put the thumbnail size in the media section of the control panel and added <?php add_theme_support( ‘post-thumbnails’ ); ?> to function.php.
    But the image is coming up full size instead of cropped to thumbnail proportions. Please let me know how to fix it. Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you’re inside the Loop, you can just use:

    <?php if (has_post_thumbnail() ) the_post_thumbnail(); ?>

    Thread Starter lizzmo

    (@lizzmo)

    Alright its resizing the featured image now, but even though I have hard crop set to true its still doing a box resize. Any ideas?

    code in functions.php

    <?php
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 150, 105, true );
    ?>

    Do you have the same issue with fresh updated images?

    Indeed, if you changed the cropping method, you have to refresh your previously cropped images to get the new crop you want.

    Thread Starter lizzmo

    (@lizzmo)

    absolutely right, thanks! just had to delete and upload the image again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page thumbnail size not working’ is closed to new replies.