<?php
   if ( ! defined( 'ABSPATH' ) ) {
     exit; // Exit if accessed directly
   }
   ?>
<?php get_header(); ?>
<?php $template_url = get_bloginfo ( 'template_url' ) . '/'; ?>
<?php 
   //to check if there is a post regarding the url access the page
   if (have_posts ()) :
     the_post(); 
   endif;
   $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'thumbnail' );
   if($url != "")
   {
   $img = $url; 
   }else{
   $img = $template_url."assets/img/background/bg-19.jpg"; 
   }
?>
<section class="page_title page_title__img-01"  style="background-image: url(<?php echo $img;?>);">
    <div class="page_title__padding">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="page_title__content">
                        <h1><?php the_title();?></h1>
                        <div class="page_title__bread-crumb">
                            <ul>
                                <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a></li>
                                <li><a href="#"><?php the_title();?></a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- |==========================================| -->
        <!-- |=====|| Team Start ||===============| -->
        <section class="team1 other_page">
            <div class="content_box_100">
                <div class="container">
                    <div class="row">
                        <div class="col-lg-12 text-center">
                            <div class="section-title">
                              <h2><?php the_field('title'); ?></h2>
                              <p><?php the_field('content'); ?></p>
                            </div>
                          </div>
                          <div class="col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="accordionWrapper">
                                <?php if(have_rows('faqs')): ?>
                                <?php $i=0; while(have_rows('faqs')): ?>
                                <?php the_row(); ?>
                                 <div class="accordionItem open">
                                    <h2 class="accordionItemHeading"><?php the_sub_field('question'); ?></h2>
                                    <div class="accordionItemContent">
                                      <p><?php the_sub_field('answer'); ?></p>
                                    </div>
                                  </div>
                                <?php $i++; endwhile; ?>
                                <?php endif; ?>
                            </div>
                        </div>                       
                    </div>    
                </div>
            </div>
        </section>
        <!-- |=====|| Team End ||=================| -->
        <!-- |==========================================| -->

    </main>
<?php get_footer(); ?>