if (have_rows('single_content')): ?>
while (have_rows('single_content')): the_row(); ?>
if (get_row_layout() == 'single_numbers'): ?>
while (have_rows('single_numbers_repeater')): the_row() ?>
$single_numbers_icon = get_sub_field('single_numbers_icon'); ?>
echo wp_get_attachment_image($single_numbers_icon['id'], 'full'); ?>
the_sub_field('single_numbers_text') ?>
endwhile; ?>
elseif (get_row_layout() == 'single_text'): ?>
the_sub_field('tekst_se') ?>
elseif (get_row_layout() == 'single_quote'): ?>
$single_quote_image = get_sub_field('single_quote_image'); ?>
echo wp_get_attachment_image($single_quote_image['id'], 'full'); ?>
the_sub_field('single_quote_text') ?>
the_sub_field('single_quote_author_name') ?>
the_sub_field('single_quote_author_position') ?>
elseif (get_row_layout() == 'single_banner'): ?>
$single_banner_image = get_sub_field('single_banner_image'); ?>
echo wp_get_attachment_image($single_banner_image['id'], 'full'); ?>
$single_banner_icon = get_sub_field('single_banner_icon'); ?>
echo wp_get_attachment_image($single_banner_icon['id'], 'full'); ?>
the_sub_field('single_banner_text') ?>
elseif (get_row_layout() == 'single_before_and_after'): ?>
$image_before = get_sub_field('image_before'); ?>
$image_after = get_sub_field('image_after'); ?>
echo wp_get_attachment_image($image_before['id'], 'full'); ?>
echo wp_get_attachment_image($image_after['id'], 'full'); ?>
the_sub_field('image_text') ?>
elseif (get_row_layout() == 'single_description'): ?>
$single_description_image = get_sub_field('single_description_image'); ?>
echo wp_get_attachment_image($single_description_image['id'], 'full'); ?>
the_sub_field('single_description_text') ?>
elseif (get_row_layout() == 'single_pricing'): ?>
the_sub_field('single_pricing_text') ?>
$single_pricing_image = get_sub_field('single_pricing_image'); ?>
echo wp_get_attachment_image($single_pricing_image['id'], 'full'); ?>
elseif (get_row_layout() == 'single_full_image'): ?>
$single_full_image = get_sub_field('single_full_image_img'); ?>
if (get_sub_field('single_full_image_title')): ?>
the_sub_field('single_full_image_title') ?>
endif ?>
echo wp_get_attachment_image($single_full_image['id'], 'full'); ?>
elseif (get_row_layout() == 'single_image_with_text'): ?>
$single_image_with_text_image = get_sub_field('single_image_with_text_image'); ?>
echo wp_get_attachment_image($single_image_with_text_image['id'], 'full'); ?>
the_sub_field('single_image_with_text_title') ?>
the_sub_field('single_image_with_text_wysiwyg') ?>
elseif (get_row_layout() == 'single_video'): ?>
$single_video = get_sub_field('single_video_url');
$single_video_poster = get_sub_field('single_video_poster');
preg_match('/src="(.+?)"/', $single_video, $matches);
$single_video_url = $matches[1];
?>
echo wp_get_attachment_image($single_video_poster['id'], 'full'); ?>
endif; ?>
endwhile; ?>
endif; ?>
get_footer(); ?>