<?php
/**
 * Template Name: FAQ Page Template
 *
 * A custom page template for FAQ Page.
 */

get_header(); ?>
  <article class="mainContent">
    
    <article class="contentBlock clear"><section class="clear">
      <?php if(have_posts()) : ?>
    <?php while(have_posts()) : the_post(); ?>
    <?php the_content() ?>
    <ul class="accordionList">
    <?php if(get_field('faqs')): ?>
    <?php while(the_repeater_field('faqs')): ?>
    <li>
      <div class="accordionButton"><h4><?php the_sub_field('question'); ?></h4></div>
      <div class="accordionContent"><?php the_sub_field('answer'); ?></div>
    </li>
    <?php endwhile; ?>
    <?php endif; ?>    
  </ul>
    <?php endwhile; ?>
    <?php endif; ?>
     </section>
     <?php get_sidebar(); ?>
     </article>
    
 
  
  <aside class="leftBar">
      <blockquote><?php the_field('quote'); ?></blockquote>
      <p><?php the_field('name'); ?></p>
    </aside>
    </article>
    
  <link href="<?php bloginfo('template_directory'); ?>/assets/style/accordion.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/assets/js/accordion.js"> </script>
  <?php get_footer(); ?>