• Resolved atlantiscanyon

    (@atlantiscanyon)


    Hi,
    Site: https://www.somewhereny.com

    I am trying to edit my post thumbnail size, from this article. I changed this in my functions.php :

    // Add Post Thumbnail Theme Support
    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 300, 300 );

    to my desired size, 300px by 300px, yet it will not change, any ideas? Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The post thumbnail size will not update retrospective post images, have you uploaded a “New Image” or used a thumbnail regeration plugin?

    HTH

    David

    Thread Starter atlantiscanyon

    (@atlantiscanyon)

    Hi,
    I deleted my posts and reuploaded the image. Yet, strangely the image on the admin-post-editing page is the proper size, but on the homepage it is still the same, any ideas?
    Thanks!!!

    Deleting the posts does not remove the images, use the Admin Media Library to remove the old images, it will show you if they are attached to a post or orphaned.

    The other consideration is if you have a page cache, and your local internet files.

    David

    Thread Starter atlantiscanyon

    (@atlantiscanyon)

    Okay,
    I removed all the images, re-uploaded the original image, and download the thumbnail regeneration plug and re sized all images, still no luck.

    The only way I can get a square image to display is if I insert the image into the “excerpt” area below the main text, yet If i have other text/images in the post they show up along with the excerpt image on the front page.

    What is the exact function call that is outputting the Post Thumbnail into your template?

    Ok it is likely the theme and the excerpt code, without knowing what is in the theme loop file it will be hard to help.

    As default WordPress will create three thumbnails based on the Admin > Settings > Media where medium is a 300 x 300 thumbnail and you can call this and resize it if you want, as an example.

    Medium Thumbnail:

    <?php echo get_the_post_thumbnail($post->ID, 'medium'); ?>

    To resize the Medium Thumbnail:

    <?php echo get_the_post_thumbnail($post->ID, array(150,150) , 'medium'); ?>

    You would have code on the loop which will call the_excerpt() and you would add the call to the image.

    Take twenty ten as an example loop.php if we wanted the excerpt and image instead of the full post

    Find:

    <div class="entry-content">
    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>

    Change to:

    <div class="entry-content">
    <?php echo get_the_post_thumbnail($post->ID, 'medium'); ?>
    <?php the_excerpt(); ?>

    I know this works for the thumbnail images as I used it in a tutorial today!

    You are setting the feature image for each post?

    HTH

    David

    Thread Starter atlantiscanyon

    (@atlantiscanyon)

    Hi,
    Thanks guys for all the help. I actually found the problem, which seems to be a little silly. Apperently in my theme f8-light the thumbnail size is defined twice, once in the funtions.php and in style.css on line 449:

    .thumbnail {
    	width:300px;
    	height:300px;
    	max-width:300px;
    	max-height:300px;
    	overflow:hidden;
    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Editing Post Thumbnail Size’ is closed to new replies.