Support » Fixing WordPress » post thumbnail not working – want thumbnail on homepage and full on single post

  • Hi,
    I have never had to post before because I always find the answer in forums somewhere. But this has really baffled me.
    I am trying to have the thumbnail size show up on index – which it is – but the full size show up on single posts.

    This is what I have in my functions.php right now:

    //enable post thumnail UI
    if (function_exists('add_theme_support')) {
    add_theme_support( 'post-thumbnails', array( 'post' ) );          // Posts only
    add_theme_support( 'post-thumbnails', array( 'page' ) );          // Pages only
    add_theme_support( 'post-thumbnails', array( 'post', 'movie' ) ); // Posts and Movies
    set_post_thumbnail_size( 256, 999, true ); //true = hard crop mode
    add_image_size( 'single-post-thumbnail', 9999, 9999 ); // Permalink thumbnail size

    I have added extra just in case I want to remove something in the future. I also tried this without using the add_image_size function and just using the sizes that I set in wordpress media settings.

    this is in my loop for index:

    if ( has_post_thumbnail() ) {
    } ?>
    <div class="entry-content">

    this is in my loop for single:

    <?php if ( has_post_thumbnail() ) {
    } ?>

    but I have also tried:

    if ( has_post_thumbnail() ) {
    } ?>


    if ( has_post_thumbnail() ) {
    } ?>

    yet nothing makes a difference = only the thumbnail size gets posted to the single posts.

    does anyone have any ideas of what is going wrong?

  • The topic ‘post thumbnail not working – want thumbnail on homepage and full on single post’ is closed to new replies.