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

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

$page_title = get_the_title();

$hero_section = get_field('services_cover_section');
$first_section_title = get_field('services_first_section')['main_title'];
$first_section_text = get_field('services_first_section')['main_paragraph'];
$second_section_cards = get_field('service_cards');
$form_shortcode = get_field('service_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="S01 p-t-5">
        <div class="container">
            <h1 class="heading2"><?php echo esc_html($first_section_title) ?></h1>
            <span class="btnText__alt"><?php echo esc_html($first_section_notice) ?></span>
            <p class="paragraph"><?php echo esc_html($first_section_text) ?></p>
        </div>
    </section>

    <section class="p-t-5 S02">
        <div class="container">
            <div class="cards__wrapper">
                <?php if(have_rows('service_cards')):?>
                    <?php while( have_rows('service_cards')): the_row(); 
                            $title = get_sub_field('service_title');
                            $cover = get_sub_field('service_cover');
                            $text = get_sub_field('service_description');

                            get_template_part( 'loop-templates/cards', 'services', array(
                                'title'              => $title,
                                'img'                => $cover,
                                'text'               => $text,
                                'is_invitation_card' => true
                            ));
                        endwhile; ?>
                <?php endif; ?>
            </div>            
            <div class="seperators__top"></div>
            <div class="seperators__bottom"></div>
        </div>
    </section>

    <section class="S03">
        <div class="overlay__dark"></div>
        <div class="booking__formWrapper">
            <div class="forms__fields">
                <?php echo do_shortcode( $form_shortcode ); ?>
            </div>
        </div>
    </section>

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