• Resolved maxhax88

    (@maxhax88)


    hi!
    on http://www.virtual-reality-games.org
    i added a secondary image to each post, shows up, everything good
    function.php:

    if (class_exists('MultiPostThumbnails')) {
        new MultiPostThumbnails(
            array(
                'label' => 'Secondary Image',
                'id' => 'secondary-image',
                'post_type' => 'post'
            )
        );
    }

    content.php:

    <?php
    if (class_exists('MultiPostThumbnails')) :
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image');
    endif;
    ?>

    only the size is not good
    it displays as thumbnail size but i want it to display 550×350

    tried to add image size in function.php, doesn’t work

    add_image_size( 'custom-size', 220, 180, true );

    tried to define size in content.php, doesn’t work

    <?php
    if (class_exists('MultiPostThumbnails')) :
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image', set_post_thumbnail_size( 550, 350, true ));
    endif;
    ?>

    how can the secondary image be displayed 550×350?
    what am i doing wrong?

    thanks in advance

Viewing 1 replies (of 1 total)
  • Thread Starter maxhax88

    (@maxhax88)

    ok got it
    thx to

    i put this in the content.php

    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image', get_the_ID(), array(550,350));

    the solution was just to put the size as the fourth parameter, and i didn’t include the post type.

Viewing 1 replies (of 1 total)

The topic ‘Multiple Post Thumbnails image size’ is closed to new replies.