Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter steven-stallone

    (@steven-stallone-1)

    Ok, I figured out why the image was cropping. Firstly I tried the solution above and It had no effect. What I didn’t realize that there was additional coding I was unaware of in the functions.php which limited any featured image in any post to just 200, 200. So there was already code to handle featured images already. I just didn’t realize it. The solution wasn’t needed after all but I did learn my first insight about php and that was the ‘true/false’ values

    Origional

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 200, 200, true );
    add_image_size( 'primary-post-thumbnail', 620, 9999 );
    add_image_size( 'secondary-post-thumbnail', 300, 9999 );

    In the original I changed the first value from 200 to 700 but the image wouldn’t crop to width but to height then I remembered the explanation of why the value was set to false in the solution above. That is the switch for the width to take precedence. So then I modified the original code to 700, 9999, false. and it worked.

    Modified

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 700, 9999, false );
    add_image_size( 'primary-post-thumbnail', 620, 9999 );
    add_image_size( 'secondary-post-thumbnail', 300, 9999 );

    Thanks Chip

    Thread Starter steven-stallone

    (@steven-stallone-1)

    Ah thank you, it sounds like it will work but I don’t have time to play with it now. I’ll check it out tomorrow, thanks

    Thread Starter steven-stallone

    (@steven-stallone-1)

    The width of the single column. That’s the same width as the embedded YouTube clip which is 700.

    I edited the first post to fix the link but it never saved

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