if( have_rows('content_blocks') ): $x = 1; while( have_rows('content_blocks') ): the_row(); // Content Block if( get_row_layout() == 'content_with_background' ): $width = get_sub_field('content_width'); $options = get_sub_field('background_options'); $image = get_sub_field('background_image'); $content = get_sub_field('content'); $overlay_color = '#51575E'; $cta_button = get_sub_field('cta_button'); $text_color = ''; $btn = 'btn'; if($options == 'White') { $color = '#fff'; } elseif($options == 'Gray') { $color = '#EFF0F0'; } elseif($options == 'Black') { $color = '#000'; $text_color = 'white-text'; $btn = 'btn btn-reverse'; } elseif($options == 'Red') { $color = '#CF0A2C'; $text_color = 'white-text'; $btn = 'btn btn-reverse'; } if($options == 'Background Image') { echo '
'; } else { echo '
'; } echo '
'.wp_kses_post($content).' '; if (!empty($cta_button) && is_array($cta_button)) { echo ''.esc_html($cta_button['title'] ?? '').''; } echo'
'; // Fullwidth Image Block elseif( get_row_layout() == 'Fullwidth_image_block' ): $image = get_sub_field('background-image'); $desktop = get_sub_field('desktop_height'); $mobile = get_sub_field('mobile_height'); echo '
'; // Images Block elseif( get_row_layout() == 'images_block' ): $desktop_height = get_sub_field('desktop_height'); $mobile_height = get_sub_field('mobile_height'); echo '
'; while( have_rows('images') ): the_row(); $bgimage = get_sub_field('image'); $width = get_sub_field('image_width'); if (is_array($bgimage) && !empty($bgimage['url'])) { echo '
'; } endwhile; echo '
'; // Video Block elseif( get_row_layout() == 'video_block' ): $url = get_sub_field('youtube_url'); $background = get_sub_field('background-image'); echo '
Play Button
'; // Image Copy Block elseif( get_row_layout() == 'image_copy_block'): $image = get_sub_field('image'); $content = get_sub_field('content'); $image_position = get_sub_field('image_position'); $cta_button = get_sub_field('cta_button'); echo'
'; if($image_position == 'Right') { echo '
'.wp_kses_post($content).' '; if (!empty($cta_button) && is_array($cta_button)) { echo ''.esc_html($cta_button['title'] ?? '').''; } echo '
'; } else { echo '
'.wp_kses_post($content).' '; if (!empty($cta_button) && is_array($cta_button)) { echo ''.esc_html($cta_button['title'] ?? '').''; } echo '
'; } echo'
'; // Accordion Section elseif( get_row_layout() == 'accordion'): $intro_content = get_sub_field('intro_content'); if (is_page(2081)) { echo '
'.$intro_content.'
'; if($x == 3){ echo 'Signiture Watermark'; } $z = 1; while( have_rows('accordion') ) : the_row(); $title = get_sub_field('title'); $content = get_sub_field('content'); $link = get_sub_field('link'); $image = get_sub_field('image'); $band_logo = get_sub_field('band_logo'); $id = strtolower(str_replace(' & ', '-', $title)); $id = strtolower(str_replace(' ', '-', $id)); if (!is_array($link)) { $link = []; } echo '
'; if($image){ echo ''.$image['alt'].''; } echo '
'; if($band_logo){ echo ''.$band_logo['alt'].''; } echo $content.'
'; if($link){ echo ''.$link['title'].''; } echo '
'; $z++; endwhile; echo'
'; } else { echo '
'.wp_kses_post($intro_content).'
'; $z = 1; while( have_rows('accordion') ) : the_row(); $title = get_sub_field('title'); $content = get_sub_field('content'); $link = get_sub_field('link'); $image = get_sub_field('image'); $band_logo = get_sub_field('band_logo'); $id = strtolower(str_replace(' & ', '-', $title)); $id = strtolower(str_replace(' ', '-', $id)); // print_r($link); if (!is_array($link)) { $link = []; } echo '
'; if ($content != '') { echo ' '.wp_kses_post($content).' '; } if (is_array($band_logo) && !empty($band_logo['url'])) { echo ' '; } if (is_array($image) && !empty($image['url'])) { echo ' '.esc_attr($image['alt'] ?? '').' '; } echo '
'; if (is_array($link) && !empty($link['url'])) { echo ''; } echo'
'; $z++; endwhile; echo'
'; } endif; $x++; endwhile; endif; ?>

Move Forward With Surface

We’re here to help. Surface Combustion is your heat treat equipment partner and expert knowledge resource as your company makes plans for innovation and growth.