Using Metabox Images Advanced field for individual image divs

Hey @FranklyCo,

when do you plan to “upload a screen shot for better reference”? :slight_smile:

However, a small helper function should do the trick:

function get_image_advanced( $id, $i = 0 ) {
    $images = rwmb_meta( $id );
    
    if ( ! is_array( $images ) || $i >= count( $images ) ) {
        return false;
    }

    return array_keys( $images )[$i];
}

You can then call this function like this:

{echo:get_image_advanced(my_custom_image,2)}

Backend:

Builder / Frontend:

Let me know if that helps.

Best,

André

2 Likes