• Hey Willy (and other users),

    I’ve got this custom post type, and I want to be able to display various pictures to some of the posts. SoI got your plugin. All is well, until I get up to the displaying part. This HTML code that I have works, but now I want to add the various images i added through your plugin. I tried various things but I just can’t seem to get it working. Could you help me out? I’ve got the following code in place:

    <div class="carousel-inner">
       <div class="item active">
          <img class="img-responsive" src="https://placehold.it/750x500" />
       </div>
       <div class="item">
          <img class="img-responsive" src="https://placehold.it/750x500" />
       </div>
       <div class="item">
          <img class="img-responsive" src="https://placehold.it/750x500" />
       </div>
    </div>

    What I would like to have is something like this:

    <div class="carousel-inner">
       <div class="item active">
          - 1st picture in this post -
       </div>
       <div class="item">
          - 2nd picture in this post -
       </div>
       <div class="item">
          - 3rd picture in this post -
       </div>
    </div>

    https://www.ads-software.com/plugins/multi-image-metabox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I wanted to do the same thing and came upon this.

    foreach(get_images_src() as $k => $i){
    echo '<img src="'.$i[0].'" width="'.$i[1].'" height="'.$i[2].'" />';
    }

    this loop comes in handy, you can modify the loop to include the slider divs.

    Thread Starter bgeijtenbeek

    (@bgeijtenbeek)

    Hey Ezetkiel,

    thank you for your response. Ofcourse i have seen this solution somewhere on this forum. I have used foreach before, but in this case the div classes aren’t all the same.

    Because I am not too proficient with PHP I don’t know how to include those divs in this loop.

    If it is not too much to ask, could you please help me out or point me in some direction where I can learn what’s going on here in your loop?

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting/Displaying images in slider’ is closed to new replies.