How to output image from group image field ?
-
Hi again, here is my param
array( 'type' => 'group', 'label' => __('3D Slider Items', 'KingComposer'), 'name' => 'options', 'description' => __( 'Repeat this fields', 'KingComposer' ), 'params' => array( array( 'name' => 'image', 'label' => 'Slider Image', 'type' => 'attach_image', ), ), ),
I write this code below to get image
$image = wp_get_attachment_image_src( $image, 'full' );
Then i run a foreach loop, but images not showing
foreach( $options as $option ){ $output .='<li class="poster-item"><a href="'.$option->image_link.'"><img src="'.$option->image[0].'" width="100%" ></a></li>'; }
Is there anything wrong in my code ?
Thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to output image from group image field ?’ is closed to new replies.