WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Post Thumbnails
More than 2 Thumbs (6 posts)

  1. jvinch
    Member
    Posted 3 years ago #

    Could I add more than 2 (3, 4 or 5) thumbnails? I'm using it for an online store with additional product images - this way I could prevent using custom fields with copied link URL's altogether, which makes it easier to use for non-technical users.

    If the answer is yes, what would the code look like?

    http://wordpress.org/extend/plugins/multiple-post-thumbnails/

  2. Chris Scott
    Member
    Plugin Author

    Posted 3 years ago #

    @jvinch

    Yes, just instantiate a new object for each thumb. e.g.

    new MultiPostThumbnails(array(
        'label' => 'Secondary Image',
        'id' => 'secondary-image',
        )
    );
    new MultiPostThumbnails(array(
        'label' => 'Tertiary Image',
        'id' => 'tertiary-image',
        )
    );
  3. Abdussamad Abdurrazzaq
    Member
    Posted 3 years ago #

    I am having a problem where only two thumbs are showing up in the admin panel. I have setup 5 thumbs per page in my functions.php file and it works fine on my local wordpress installation but not on my remote server's wordpress install. Any help would be appreciated? I am using wordpress 3.0.1 and the code in functions.php is:

    for ($i=1;$i<6;$i++) {
    
            new MultiPostThumbnails(array(
                'label' => "Right Side Image $i",
                'id' => "right-image-$i",
                    'post_type' => 'page'
                )
            );
    }

    Can anyone help me fix this problem?

    Also there is a strange bug whereby clicking on a thumbnail and choosing a replacement image does not stick. You have to first click on the remove link and save your post before choosing a new image.

  4. memic4
    Member
    Posted 3 years ago #

    I have the same problem.
    Only 2 boxes are showing in admin panel, but I created 3 in functions.php:

    $thumb = new MultiPostThumbnails(array(
            'label' => 'Second Image',
            'id' => 'second-image',
            'post_type' => 'page'
            )
        );
        new MultiPostThumbnails(array(
            'label' => 'Third Image',
            'id' => 'third-image',
            'post_type' => 'page'
            )
        );
        new MultiPostThumbnails(array(
            'label' => 'Fourth Image',
            'id' => 'fourth-image',
            'post_type' => 'page'
            )
        );

    It shows only the "Fourth image" box and the "Third image" box.
    (also in the wrong order..)

    "Second Image" box fail to print.

    Have you any solutions?

    Any help would be appreciated.

    P.S.. but in the popup window I have correctly the 3 links, Set as Second image, Set as Third and Fourth...

    P.P.S
    it works fine on the local wordpress installation but not on the remote server's wordpress. both wordpress 3.0.1

  5. vikrantmca
    Member
    Posted 3 years ago #

    I have used the folllowing code and its works fine for me.
    $thumb2 = new MultiPostThumbnails(
    array(
    'label' => 'IInd Image',
    'id' => 'image2',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image2-thumbnail', 260, 195, true);

    $thumb3 = new MultiPostThumbnails(array(
    'label' => 'IIIrd Image',
    'id' => 'image3',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image3-thumbnail', 260, 195, true);
    $thumb4 = new MultiPostThumbnails(array(
    'label' => 'IVth Image',
    'id' => 'image4',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image4-thumbnail', 260, 195, true);
    $thumb5 = new MultiPostThumbnails(array(
    'label' => 'Vth Image',
    'id' => 'image5',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image5-thumbnail', 260, 195, true);
    $thumb6 = new MultiPostThumbnails(array(
    'label' => 'VIth Image',
    'id' => 'image6',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image6-thumbnail', 260, 195, true);
    $thumb7 = new MultiPostThumbnails(array(
    'label' => 'VIIth Image',
    'id' => 'image7',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image7-thumbnail', 260, 195, true);
    $thumb8 = new MultiPostThumbnails(array(
    'label' => 'VIIIth Image',
    'id' => 'image8',
    'post_type' => 'post'
    )
    );
    add_image_size('post-image8-thumbnail', 260, 195, true);

  6. memic4
    Member
    Posted 3 years ago #

    I still have not found any solution to this problem. Anyone with some clues?

    I added 9 thumbnails but nothing..

    You can see here what's the problem:
    http://www.memic.net/some_files/screenshot.png

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic