• Resolved john_foster

    (@john_foster)


    I’m getting frustrated here. I’ve added add_theme_support( ‘post-thumbnails’ ); in to my functions.php file.. and in my code I’ve implemented <?php the_post_thumbnail(); ?>.. yet nothing happens?

    I’m thinking I just dont fully understand this function? I thought it just reads your post and grabs the first image in it and makes it a thumb to put in your the_excerpt? That’s what I’m wanting it to do. I have the_excerpt on my main page and I want to use <?php the_post_thumbnail(); ?> for it to grab a thumb of the image in the post.

    Do I need to specify a specific thumbnail image or something? If so, how? why is nothing happening here?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Do I need to specify a specific thumbnail image or something?

    Yes

    If so, how?

    Edit Post page – lower right hand column – Set featured image.

    Thread Starter john_foster

    (@john_foster)

    Ok I’ve specified a feature image in the edit post section and classified it as a thumbnail. It now shows up in my post excerpt.. but the set_post_thumbnail_size( 140, 140 ); doesn’t seem to work.. it just keeps to the default WP thumbnail settings of 150×150.. even even if I click full-size then use as featured image it will stay at the default thumb size in the excerpt, or default featured image size, whichever it is.

    I know the <?php the_post_thumbnail(); ?> works because I’ve applied a class with a gray border and some margin on it, and it applies fine.
    How do i go about changing the size of the thumb. Feels like I’m really close! as a side question how do I get the blue border off of <?php the_post_thumbnail(); ?> if I can’t apply a “border=0” on it like I would an image?

    Your theme may be setting up the post_thumbnail dimensions. Have a look in functions.php

    Thread Starter john_foster

    (@john_foster)

    Thanks for the help, all fixed now ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Confused about the_post_thumbnail’ is closed to new replies.