content.php 854 Bytes
Newer Older
Benthe Kuijpers's avatar
Benthe Kuijpers committed
1
2
3
4
5
6
7
8
9
<?php
$order = get_sub_field('order');
$background = get_sub_field('background');
$image = get_sub_field('image');
?>
<div class="content-row content-row--<?php echo $order; ?> content-row--<?php echo $background; ?>" data-index="<?php echo $row_index; ?>">
	<div class="container container--flex">
		<?php if ($image) { ?>
			<div class="image-wrapper">
Benthe Kuijpers's avatar
Benthe Kuijpers committed
10
				<img src="<?php echo $image; ?>">
Benthe Kuijpers's avatar
Benthe Kuijpers committed
11
12
13
14
			</div>
		<? } ?>
		<div class="text-wrapper">
			<?php echo get_sub_field('content');
Benthe Kuijpers's avatar
Benthe Kuijpers committed
15

16
17
18
19
20
21
22
23
			$button = get_sub_field('button');
			if( $button ):
			  $btn_url = $button['url'];
			  $btn_title = $button['title'];
			  $btn_target = $button['target'] ? $button['target'] : '_self';
			  	echo '<a href="' . esc_url( $btn_url ) . '" target="' . esc_attr( $btn_target ) . '" class="btn">' . esc_html( $btn_title ) . '</a>';
			endif;
			?>
Benthe Kuijpers's avatar
Benthe Kuijpers committed
24
		</div>
25
26
	</div>
</div>