Viewing 5 replies - 1 through 5 (of 5 total)
  • I am looking for the same solution.

    So far, I can only get the slider to show the first image, the feature image.

    Thread Starter afrila gunadi

    (@afrila-gunadi)

    now, i have a solution.

    this my code :

    <div class="callbacks_container">
                                <ul class="rslides pic_slider">
    
            <?php
            if (has_post_thumbnail()) {
                $image_id = get_post_thumbnail_id ($room->ID );
                $image_thumb_url = wp_get_attachment_image_src( $image_id,'feature-image');
                $attr = array(
                    'class' => "room-sample",
    
                );
                echo '<li>';
                the_post_thumbnail ('feature-image', $attr );
                echo '</li>';
            }
            if (class_exists('MultiPostThumbnails')) {                             
    
            $i=1;
                while ($i<=3) {
                    $image_name = 'image-'.$i;  // my name id thumbnail = image-2, image-3.
                    if (MultiPostThumbnails::has_post_thumbnail('room', $image_name )) {
                        $image_id = MultiPostThumbnails::get_post_thumbnail_id( 'room', $image_name, $post->ID );
                        $image_thumb_url = wp_get_attachment_image_src( $image_id,'feature-image');
                        $image_feature_url = wp_get_attachment_image_src( $image_id,'feature-image' );
                        $attr = array(
                            'class' => "room-sample",
                        );                                                                                     
    
                        $image = wp_get_attachment_image( $image_id, 'feature-image', false, $attr );
                        echo '<li>';
                        echo $image;
                        echo '</li>';
    
                    }
                    $i++;
                }                           
    
            };
         ?>
    
            </ul>
            </div>

    in my case, $room it’s mean post_type “room”.
    “if” the first to display a thumbnail without plugins. and “if” the second, showing two thumbnails that I created with the plugin. so, all three thumbnails.

    good luck ??

    Have you resolved your issue? Can we mark this as resolved?

    Thanks!

    I ended up using a different plugin to get it working – Ultimate Post Thumbnails plugin

    Thread Starter afrila gunadi

    (@afrila-gunadi)

    jeff : yes, I think this has been resolved ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to create a slider with multiple post thumbnail plugin ?’ is closed to new replies.