
Hello,
can’t get this to work:
if( have_rows('set-gallery') ) {
$customer = get_field('set-info-customer');
$production = get_field('set-info-production');
$styling = get_field('set-info-styling');
$location = get_field('set-info-location');
while ( have_rows('set-gallery') ) { the_row();
$o = '';
$img = get_sub_field('set-gallery-img');
$img_url = $img['sizes']['thumb'];
$o .= '<li class="col-xs-12 col-sm-3 grid-item item-'.$mode.'">';
$o .= '<a class="open-modal" href="#animatedModal" ic-get-from="detail.html" ic-target=".modal-content" ic-select-from-response="#page" ic-push-url="false">';
$o .= '<figure>';
$o .= '<img src="'.$img_url.'" class="img-responsive">';
$o .= '<figcaption>';
$o .= '<ul>';
if (!empty($customer)) {
$o .= '<li>Kunde/Auftraggeber:'.$customer.'</li>';
}
if (!empty($production)) {
$o .= '<li>Produktion:'.$production.'</li>';
}
if (!empty($styling)) {
$o .= '<li>Styling:'.$styling.'</li>';
}
if (!empty($location)) {
$o .= '<li>Location:'.$location.'</li>';
}
$o .= '<li>'.$description.'</li>';
$o .= '</ul></figcaption></figure></a></li>';
echo $o;
$img seems to be no array?
What is the field returning?
$img = get_sub_field('set-gallery-img');
var_dump($img);