• Resolved charismaarts

    (@charismaarts)


    Hello:

    I am trying to create a page which lists category posts using a query…here is the page: https://privatelabel.gtdsites.com/cat-one/

    this is just a test version; got it all working – the problem is that the thumbnails are not resizing to the exact same size like i had hoped; i have the image size set to 173×203 and that works; but if image sizes are different it doesnt work so well; that it would take the upper left portion of the pic that would fit into 173×203; it would take the biggest piece it could and of course resize it; it seems there are other wordpress things that do this (they may take center portion though; which i guess would be fine as well)…

    anyway; i tried to put this “true” thing on there that i thought would crop it but that doesnt seem to have done anything;

    the code for displaying the thumbnail is this:

    <div id=”gpic1″>
    <?php the_post_thumbnail(“gthumb”,array(‘class’ => ‘frame’)); ?>
    </div>

    i also put this code into custom_functions.php (thesis theme):

    function add_custom_sizes() {
    add_image_size( ‘gthumb’, 173, 203, true );
    add_image_size( ‘portfolio-image’, 1074, 725, true );
    add_image_size( ‘available-homes’, 500, 279, true );
    add_image_size( ‘idea-thumb’, 146, 141, true );
    }
    add_action(‘after_setup_theme’,’add_custom_sizes’);

    so anyway; i have no idea how to make this work; was trying to find a way to do this and piece it together but cant get this final part to work; can anyone help?

    thanks, Gerard

Viewing 2 replies - 1 through 2 (of 2 total)
  • This new function does not change existing media – did you upload and add the media afterwards? When doing so do you see your custom sizes?

    Thread Starter charismaarts

    (@charismaarts)

    thanks very much swd; i guess what i did worked fine – I just did not know that; just put new ones on and it worked great; thanks for letting me know!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘image crop?’ is closed to new replies.