• Resolved hawbsl

    (@hawbsl)


    Documentation says to find images in
    the meta field ‘_exhibition_images’.

    can you give a simple example of how that’d work in a template. i don’t want a carousel i just want to retrieve the images:
    e.g.
    what would go inside my div here:
    <div class=”image” id=”image1″>
    </div>

    https://www.ads-software.com/plugins/exhibition/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Watson

    (@mwtsn)

    Hi hawbsl,

    If you want to list the images out like that, putting the following code in your loop should help you out:

    <?php
        $exhibition_images  = get_post_meta( $post->ID, '_exhibition_images', true );
        $count = 1;
        if( is_array( $exhibition_images ) )
        {
           foreach( $exhibition_images as $image_id )
           {
               ?>
               <div class="image" id="image<?php echo $count;?>">
                   <?php echo wp_get_attachment_image( $image_id, 'full' );?>
               </div>
               <?php
               $count++;
            }
        }
    ?>

    I hope that helps, let me know if it fixes it for you.

    Matt ??

    Thread Starter hawbsl

    (@hawbsl)

    hi matt

    that looks really straightforward and thanks for the reply. we did opt for a different plugin in the end so i’ve not had the chance to test it. but we might come back here for future projects.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can you say a bit more about using '_exhibition_images'’ is closed to new replies.