'; foreach($data as $index=>$content){ $left_aligned = "twae-right-aligned"; if($layout == 'centered'){ if($countItem % 2 == 0){ $left_aligned = "twae-left-aligned"; } } $timeline_description = $content['twae_description']; $show_year_label = $content['twae_show_year_label']; $timeline_year = $content['twae_year']; $story_date_label = $content['twae_date_label']; $story_extra_label = $content['twae_extra_label']; $timeline_story_title = $content['twae_story_title']; $story_icon = $content['twae_story_icon']['value']; $thumbnail_size = $content['twae_thumbnail_size']; $thumbnail_custom_dimension = $content['twae_thumbnail_custom_dimension']; if($content['twae_image']['id']!=""){ if($thumbnail_size =='custom'){ $custom_size = array ( $thumbnail_custom_dimension['width'],$thumbnail_custom_dimension['height']); $image= wp_get_attachment_image($content['twae_image']['id'], $custom_size , true); } else{ $image= wp_get_attachment_image($content['twae_image']['id'],$thumbnail_size, true); } $image = '
'.$image.'
'; }else if($content['twae_image']['url']!=""){ $image = '
'; } else{ $image =''; } if($show_year_label == 'yes'){ echo ' '.$timeline_year.' '; } echo '
'; \Elementor\Icons_Manager::render_icon( $content['twae_story_icon'], [ 'aria-hidden' => 'true' ] ); echo'
'.$timeline_story_title.' '.$image.'
'.$timeline_description.'
'; $countItem = $countItem +1; } echo'
';