• ikbenbritt

    (@ikbenbritt)


    Hi there,

    I’m breaking my head over this, searched the internet… But I can’t figure out what I’m doing wrong here…

    I’m building a theme and on the homepage I want the thumbnails/featured image to be 290 pixels wide and 190px in height, whatever I do I can’t get it working…

    Functions.php:

    if(function_exists('add_theme_support'))
        add_theme_support('post-thumbnails');
    set_post_thumbnail_size( 290, 190, true );

    Index.php:
    <?php the_post_thumbnail(); ?>
    I’ve tried so many types of code here, none of them is working…
    Site: http://www.brittvannoord.nl/alcatraz/

    Can someone please tell me what to use in functions.php and what in my index.php. I’ve been over this so many times I lost track of wrong and right..

    Thanks in advance,
    Britt

Viewing 3 replies - 1 through 3 (of 3 total)
  • What happens or what goes wrong?

    For so far I can see this should be about working. You can check if ‘the_post_thumbnail()’ is within the loop and if ‘set_post_thumbnail_size’ is not overwritter somewhere else either in functions.php or some plugin that wreaks havoc.

    Thread Starter ikbenbritt

    (@ikbenbritt)

    As you can see in this link: http://www.brittvannoord.nl/alcatraz/ images aren’t 290x190px

    the the_post_thumbnail() is within the loop and when I deactive all my plugins and remove every other things from my functions.php and this is the only thing left in it:

    <?php
    
        add_theme_support( 'menus' );
    
    if(function_exists('add_theme_support'))
        add_theme_support('post-thumbnails');
    set_post_thumbnail_size( 290, 190, true );
    
    ?>

    It’s still not working…

    Did you try with a bigger image? Since this image looks like to be
    200px × 300px (scaled to 126px × 190px). Maybe WordPress doesn’t like to make images bigger in width and tries to keep the aspect ratio?

    The 190px scaling is at least one of your boundaries…

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

The topic ‘Featured image size’ is closed to new replies.