Amy-Mir / page-templates / contact-template.php
contact-template.php
Raw
<?php
/**
 * Template Name: Contact Template
 *
 * Template for displaying contact page.
 *
 * @package UnderStrap
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$page_title = get_the_title();

$hero_section = get_field('contact_cover_section');
$form_title = get_field('contact_form_info_title');
$form_text = get_field('contact_form_info_paragraph');
$form_shortcode = get_field('contact_form_shortcode');

get_header();

?>

<main>
    <section class="hero">
        <?php
        $hero_args = array(
        'image'     => $hero_section,
        'pageTitle' => $page_title,
        ); 
        get_template_part('global-templates/cover', null, $hero_args); ?>
    </section>

    <section class="p-t-5 S01">
        <div class="container">
            <div class="forms__wrapper">
                <div class="forms__ill">
                    <div class="forms__illContent">
                        <h1 class="heading2"><?php echo esc_html($form_title); ?></h1>
                        <p class="paragraph"><?php echo esc_html($form_text); ?></p>
                        <?php get_template_part( "global-templates/contacts"); ?>
                    </div>
                </div>
                <div class="forms__fieldsWrapper">
                    <div class="forms__fields">
                        <?php echo do_shortcode( $form_shortcode ); ?>
                    </div>
                </div>
            </div>
            <div class="seperators__top"></div>
            <div class="seperators__bottom"></div>
        </div>        
    </section>

    <section class="S02">
        <?php get_template_part( 'loop-templates/sponsors' ); ?>
    </section>
</main>
<?php
get_footer();
?>