Get different sizes in one function
-
I am trying to use light box where the image is a thumbnail but opens to a full size image when clicked. So I need the
<a>
to generate the size=full but the<img>
needs to generate the size=thumbnail. Here is my code so far.<?php $dyno_images = rwmb_meta( 'gallery-images', 'type=image_advanced&size=full' ); ?> <?php foreach ( $dyno_images as $dyno_image ){ echo '<figure class="gallery-item"> <div class="gallery-icon landscape"> <a href="'.$dyno_image['url'].'" class="fancybox image" rel="gallery"> <img src="'.$dyno_image['url'].'" aria-describedby="gallery-1-584" class="attachment-full"> </a> </div> </figure>'; } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get different sizes in one function’ is closed to new replies.