• groochy

    (@groochy)


    I have a problem that i can’t fix.

    My post thumbnail size must be a fixed size 200×150 for al the inserted images. I edited the code in the wp-content\themes\MyTheme\functions.php

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
            set_post_thumbnail_size( 250, 150 );
    }

    still no result…

    I’m out of options

    the image in the post itself is 350×350 (that is fixed).

    the site is wordpressadite.be (it’s a Belgian school site)

    I would be thankfull if anyone can provide me with a solution.

    thx !

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    (@esmi)

    If you have only added this recently, you will need to regenerate all of the image sizes.
    http://wordpress.org/extend/plugins/regenerate-thumbnails/

    PS: your domain name contravenes the WordPress trademark.

    Thread Starter groochy

    (@groochy)

    @ esmi : thx i will check it out
    about our domain name (normal we keep it for testing only).

    We blocked it for search-engines, the site that goes public is another url

    Thread Starter groochy

    (@groochy)

    it doesn’t work for my post_thumbs… my nivo slider is resized do…

    somebody any tips plz…

    esmi

    (@esmi)

    Try using set_post_thumbnail_size( 250, 150, true ); but remember to regenerate the thumbs again via the plugin.

    Thread Starter groochy

    (@groochy)

    esmi, Thank you !!!

    I worked (i only have to put my slider back again).

    When I post new posts does it automaticly chooses the 250×150 settings?

    thx man!

    esmi

    (@esmi)

    No problem 🙂

    Thread Starter groochy

    (@groochy)

    1 more quick question, is there a possibility that when one of the users makes a new post and he/she doesn’t includes an image that wordpress automaticly uses a pre-defined image.

    esmi

    (@esmi)

    Yes – that can be done with a little extra code. Right now, you probably have something like:

    <?php the_post_thumbnail();?>

    This could be replaced with something like:

    <?php if( has_post_thumbnail() ): the_post_thumbnail();
    else:?><img src="<?php echo get_stylesheet_directory_uri();?>/images/default-thumb.jpg" width="xx" height="yy" alt="" />
    <?php endif;?>

    where default-thumb.jpg is your chosen pre-defined image in your theme’s images folder.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘edit post thumbnail size to fixed size’ is closed to new replies.