<?php get_header(); ?>
<section id="content" role="main" class='col-12'>
  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <header class="header">
        <h1 class="entry-title"><?php the_title(); ?></h1>
      </header>
      <section class="entry-content">
        <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
        <?php the_content(); ?>

        <?php
        $add_forms = get_field('add_forms');
        $video_link = get_field('video');
        ?>

        <?php if($add_forms):?>
          <div class='contact-forms'>
            <?php echo $add_forms;?>
          </div>
        <?php endif; ?>

        <?php if($video_link):?>
          <div class=' block island-margin row'>
            <div class='img island-half-bottom  video-image col-12 col-8-m center'>
                <div class="embed-container">
                  <?php the_field('video'); ?>
                </div>
            </div>
          </div>

        <?php endif; ?>


        <div class="entry-links"><?php wp_link_pages(); ?></div>
      </section>
    </article>
    <?php if ( ! post_password_required() ) comments_template( '', true ); ?>
  <?php endwhile; endif; ?>
</section>

<?php get_footer(); ?>
