$background_image = get_sub_field('background_image'); $background_align = get_sub_field('image_align'); $background_size = get_sub_field('image_size'); $background_repeat = get_sub_field('background_repeat'); $image_overlay_active = get_sub_field('image_overlay_active'); $image_overlay = get_sub_field('image_overlay'); $image_overlay_opacity = get_sub_field('image_overlay_opacity') / 100; $content = get_sub_field('content'); $content_color = get_sub_field('content_color'); $content_align = get_sub_field('content_align'); /* |---------------------------------------------------------------- | Card block. |---------------------------------------------------------------- */ echo '<div class="card col-md-4 col no-padding" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . '">'; echo '<div class="card-inner">'; /* |---------------------------------------------------------------- | Title/Divider/Subtitle. |---------------------------------------------------------------- */ get_template_part('includes/acf/parts/assets/title-divider-subtitle'); /* |---------------------------------------------------------------- | If the '$content' isn't empty display it. |---------------------------------------------------------------- */ if (!empty($content)) { echo '<div class="content-wrapper" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . $content . '</div>'; }
|---------------------------------------------------------------- | Get the slide fields and put them in variables for easy usage. |---------------------------------------------------------------- */ $background = get_sub_field('background'); $background_color = get_sub_field('background_color'); $background_image = get_sub_field('background_image'); $background_align = get_sub_field('image_align'); $background_size = get_sub_field('image_size'); $background_repeat = get_sub_field('image_repeat'); /* |---------------------------------------------------------------- | Slide. |---------------------------------------------------------------- */ echo '<li class="slide" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . '" data-slide-index="' . $i . '">'; echo '<div class="slide-content">'; /* |---------------------------------------------------------------- | If there are row's on content. |---------------------------------------------------------------- */ if (have_rows('content')) { /* |---------------------------------------------------------------- | While there are row's on content. |---------------------------------------------------------------- */ while (have_rows('content')) { the_row(); switch (get_row_layout()) {
$padding_title = get_sub_field('padding_title'); $title_subtitle_width = get_sub_field('title_subtitle_width'); $background = get_sub_field('background'); $background_color = get_sub_field('background_color'); $background_image = get_sub_field('background_image'); $background_align = get_sub_field('image_align'); $background_size = get_sub_field('image_size'); $background_repeat = get_sub_field('image_repeat'); $margin_container = get_sub_field('margin_container'); $padding_container = get_sub_field('padding_container'); /* |------------------------------------------------------------------------------------------------------------------------------------------------- | The call to action block. |------------------------------------------------------------------------------------------------------------------------------------------------- */ echo '<div id="call-to-action" class="container-fluid container-capped same-col-height" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . ' margin: ' . $margin_container . '; padding: ' . $padding_container . '; ">'; echo '<div class="row on-top-overlay">'; /* |---------------------------------------------------------------- | Title/Divider/Subtitle. |---------------------------------------------------------------- */ echo '<div class="' . set_col_size($title_subtitle_width) . ' col-sm-12 col-xs-12 col" style="margin: ' . $margin_title . '; padding: ' . $padding_title . '">'; get_template_part('includes/acf/parts/assets/title-divider-subtitle'); echo '</div>'; /* |---------------------------------------------------------------- | If the field is filled, get the row layout. |---------------------------------------------------------------- */ if (get_sub_field('action_type')) {
$background = get_sub_field('background'); $background_color = get_sub_field('background_color'); $background_image = get_sub_field('background_image'); $background_align = get_sub_field('image_align'); $background_size = get_sub_field('image_size'); $contact_form_shortcode = get_sub_field('contact_form_7_id'); $contact_form_style = get_sub_field('contact_form_style'); $contact_form_align = get_sub_field('contact_form_align'); $contact_form_width = get_sub_field('contact_form_width'); $contact_form_max_width = get_sub_field('contact_form_max_width'); /* |------------------------------------------------------------------------------------------------------------------------------------------------- | The Contact Form Block |------------------------------------------------------------------------------------------------------------------------------------------------- */ echo '<div id="contact-form" class="container-fluid container-capped" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . ' margin: ' . $margin . '; padding: ' . $padding . ';">'; echo '<div class="row contact-form ' . $contact_form_style . ' on-top-overlay">'; /* |---------------------------------------------------------------- | Title/Divider/Subtitle. |---------------------------------------------------------------- */ get_template_part('includes/acf/parts/assets/title-divider-subtitle'); /* |---------------------------------------------------------------- | Contact Form. |---------------------------------------------------------------- */ echo '<div class="' . set_col_size($contact_form_width) . '" style="' . align_left_right_center($contact_form_align) . '">'; echo do_shortcode($contact_form_shortcode); echo '</div>';
|---------------------------------------------------------------- */ $margin = get_sub_field('margin'); $padding = get_sub_field('padding'); $background = get_sub_field('background'); $background_color = get_sub_field('background_color'); $background_image = get_sub_field('background_image'); $background_align = get_sub_field('image_align'); $background_size = get_sub_field('image_size'); $background_repeat = get_sub_field('image_repeat'); /* |------------------------------------------------------------------------------------------------------------------------------------------------- | Text with image block. |------------------------------------------------------------------------------------------------------------------------------------------------- */ echo '<div id="text-with-image" class="container-fluid no-padding same-col-height" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . ' margin: ' . $margin . '; padding: ' . $padding . ';">'; /* |---------------------------------------------------------------- | If the field is filled, get the row layout. |---------------------------------------------------------------- */ if (get_sub_field('content')) { while (has_sub_field('content')) { switch (get_row_layout()) { /* |---------------------------------------------------------------- | If row layout is text block. |---------------------------------------------------------------- */ case 'text_block': get_template_part('includes/acf/parts/text-with-image-text');
switch (get_row_layout()) { case 'cards_normal': $card_type = 'no-padding'; break; case 'cards_with_icon': $card_type = 'container-capped'; break; } } } /* |------------------------------------------------------------------------------------------------------------------------------------------------- | The Cards block. |------------------------------------------------------------------------------------------------------------------------------------------------- */ echo '<div id="cards" class="container-fluid ' . $card_type . ' same-col-height" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . ' margin: ' . $margin_container . '; padding: ' . $padding_container . ';">'; /* |---------------------------------------------------------------- | If the field is filled, get the row layout. |---------------------------------------------------------------- */ if (get_sub_field('card_type')) { while (has_sub_field('card_type')) { switch (get_row_layout()) { /* |---------------------------------------------------------------- | If row layout is cards normal. |---------------------------------------------------------------- */ case 'cards_normal': get_template_part('includes/acf/parts/cards-normal');