Custom Fields
Re-Envisioned
Support Meta Box Group Can't get image_advanced alt in nested group

This topic contains 2 replies, has 2 voices, and was last updated by  Anh Tran 2 weeks, 1 day ago.

  • Creator
    Topic
  • #15250

    sergeysemenov
    Participant
    $object_imgs = isset( $object['dekor_image'] ) ? $object['dekor_image'] : array();
    if ( ! empty( $object_imgs ) ) {
        foreach ( $object_imgs as $object_img ) {
            echo '<a href="'. wp_get_attachment_image_url( $object_img, 'type=image_advanced&size=full&multiple=true' ) .'" rel="fancybox"><img src="' . wp_get_attachment_image_url( $object_img, 'type=image_advanced&size=full&multiple=true' ) . '" alt="' . RWMB_Image_Field::file_info( $object_img ) . '" /></a>';
        }
    }

    Only get Array in fancybox

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #15251

    sergeysemenov
    Participant

    Get an Array in fancybox

    #15253

    Anh Tran
    Keymaster

    Hi, please change the code to:

    $object_imgs = isset( $object['dekor_image'] ) ? $object['dekor_image'] : array();
    if ( ! empty( $object_imgs ) ) {
        foreach ( $object_imgs as $object_img ) {
            $image = RWMB_Image_Field::file_info( $object_img );
            echo '<a href="'. $image['full_url'] . '" rel="fancybox"><img src="' . $image['full_url'] . '" alt="' . $image['alt'] . '" /></a>';
        }
    }
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.