Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m not seeing where you register the thumbnail size “portfolio_big”, do you have it registered as a thumbnail size? otherwise you need to use the standard ones; that’s from looking at this with first glance.

    Thread Starter mpjltd

    (@mpjltd)

    i have added this:

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size(150, 100, true);
    add_image_size( 'indexpic', 966, 260, true );
    add_image_size( 'portfolio_big', 966, 260, true );
    add_image_size( 'portfolio_small', 452, 177, true );

    in functions.php onside the theme folder

    <img src="<?php echo the_post_thumbnail($post->ID, "portfolio_small", true);?>" alt="" />

    ‘the_post_thumbnail()’ creates its own img tag:

    http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    so, the above code should be:

    <?php echo the_post_thumbnail($post->ID, "portfolio_small", true);?>

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

The topic ‘get_post_meta vs. the_post_thumbnail’ is closed to new replies.