• <?php $gallery_images = explode( ‘,’, get_post_meta( get_the_ID(), ‘_easy_image_gallery’, true ) );

    foreach($gallery_images as $image_id) { // looping on user-selected attachment IDs

    $image_src = wp_get_attachment_url( $image_id ); // returns an array
    $image_thumb_src = wp_get_attachment_url( $image_id, ‘sliders’ ); // returns an array
    $alt_text = get_post_meta($image_id, ‘_wp_attachment_image_alt’, true);
    $caption = $image_id->post_excerpt; ?>
    <div class=”item”>
    <?php echo ‘' . $alt_text . '‘; ?>

    • This topic was modified 8 years, 5 months ago by hirtsat.
  • The topic ‘change img size not img src in the php’ is closed to new replies.