Invalid argument supplied for foreach()
-
I have set up a custom field with the following:
Field type: Photo Gallery
AE Post Template Layout: Global
Rule: post type equal product profile (where I’m storing related images to be displayed)AE Templates:
Post template
Using ACF Gallery widget
Set field with photo gallery field apiThrows the following error:
Warning
: Invalid argument supplied for foreach() in
…./html/wp-content/plugins/anywhere-elementor-pro/includes/modules/acf-gallery/skins/skin-base.php
on line
1447<div <?php echo $this->parent->get_render_attribute_string('grid-wrapper'); ?>> <div class="ae-grid"> <?php // THE NEXT LINE IS 1447 if(!empty($images)) { foreach ($images as $image) { if ($image_size == 'full') { $src = $image['url']; } else { $src = $image['sizes'][$image_size]; } ?> <figure class="ae-grid-item"> <div <?php echo $this->parent->get_render_attribute_string('grid_item_inner'); ?>> <?php if($this->get_instance_value('enable_image_ratio') == 'yes') { ?> <div class="ae-acf-image"> <?php } ?> <a href="<?php echo $image['url']; ?>" <?php echo $this->parent->get_render_attribute_string('link'); ?>> <img src="<?php echo $src; ?>"/> <div class="ae-grid-overlay <?php echo $animation ?>"> <div class="ae-grid-overlay-inner"> <div class="ae-icon-wrapper"> <?php if (!empty($icon)) { ?> <div class="ae-overlay-icon"><i class="<?php echo $icon ?>"> </i></div> <?php } ?> </div> <?php if (!empty($image['caption']) && $caption == 'yes') { ?> <div class="ae-overlay-caption"><?php echo $image['caption']; ?></div> <?php } ?> </div> </div> </a> <?php if($this->get_instance_value('enable_image_ratio') == 'yes') { ?> </div> <?php } ?> </div> </figure> <?php } }?> </div> </div> <?php }
- The topic ‘Invalid argument supplied for foreach()’ is closed to new replies.