File: /var/www/e-tdr.com/e-tdr/wp-content/themes/e-tdr/templates/thank-you.php
<?php
/**
* Template Name: Thank You Page
*
* @package EveryCRED_eTDR
*/
get_header(); ?>
<?php
// Get ACF fields from the current page
$submission_text = get_field('submission_text');
$greeting_text = get_field('greeting_text');
$description_ty = get_field('description');
$cta_actions = get_field('cta_actions');
?>
<main class="thank-you-page">
<section class="container">
<div class="row justify-content-center text-center">
<div class="col-lg-7">
<div class="success-icon-wrap mb-4">
<div class="success-icon">
<i class="bi bi-check-lg"></i>
</div>
<div class="success-ring"></div>
</div>
<?php if ($submission_text) : ?>
<div class="sec-label mb-3"><?php echo esc_html($submission_text); ?></div>
<?php endif; ?>
<?php if ($greeting_text) : ?>
<h1 class="sec-title mb-3"><?php echo esc_html($greeting_text); ?></h1>
<?php endif; ?>
<?php if ($description_ty) : ?>
<div class="sec-sub mx-auto mb-5">
<?php echo wp_kses_post($description_ty); ?>
</div>
<?php endif; ?>
<?php if ($cta_actions) : ?>
<div class="cta-actions d-flex flex-wrap justify-content-center gap-3">
<?php foreach ($cta_actions as $index => $cta) :
$btn_text = $cta['button_text'];
$btn_link = $cta['button_link'];
$btn_class = ($index === 0) ? 'btn-hero-primary' : 'btn-outline-dark';
if ($btn_text && $btn_link) :
?>
<a href="<?php echo esc_url($btn_link); ?>" class="<?php echo esc_attr($btn_class); ?>">
<?php echo esc_html($btn_text); ?>
</a>
<?php endif; endforeach; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
</main>
<?php get_footer(); ?>