<?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."img/acupuncturebg.jpg"; 
   }
?>
<!-- breadcrumb start -->
<section class="z-index-common breadcumb-wrapper" style="background-image: url(<?php echo $img;?>); background-size: 100%;">
    <div class="container">
      <div class="row justify-content-between align-items-center">
        <div class="col-auto">
          <div class="breadcumb-content">
            <h1 class="breadcumb-title"><?php if(get_field('bradcamp_title') != ""){ echo get_field('bradcamp_title');}else{ the_title();}?></h1>
            <div class="breadcumb-menu-wrap">
              <ul class="breadcumb-menu">
                <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a></li>
                <li><?php if(get_field('bradcamp_title') != ""){ echo get_field('bradcamp_title');}else{ the_title();}?></li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
<!-- breadcrumb end -->
<!-- team slider start -->
    <section id="team" class="py-5">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="section_title text-center">
                        <?php the_content();?>
                    </div>
                </div>
            </div>
            <div class="row align-items-center justify-content-center g-4">
                <?php
                $args = array(
                            'post_type'      => 'page',
                            'posts_per_page' => -1,
                            'post_parent'    => 454,
                            'order'          => 'DESC',
                            'orderby'        => 'menu_order'
                         );
                $query = new WP_Query($args);
                

                $post_count = $query->post_count;
                if ( $query->have_posts() ){
                $i = 1;
                  while ( $query->have_posts() ){
                    $query->the_post();
                    $img_url = get_the_post_thumbnail_url( get_the_ID(),'full');
                    $post = get_post(get_the_ID());
              ?>
                <div class="col-sm-6 col-md-4 col-lg-3">

                    <div class="card team_card">
                        <a href="<?php the_permalink();?>">
                            <div class="team_wrapper">
                                <div class="team_image m-auto position-relative page_team_img">
                                    <img src="<?php the_field('front_image');?>" alt="">

                                </div>

                                <div class="team_contentt mt-3 py-4 px-3">
                                    <h3 class="team_title"><?php echo get_the_title();?></h3>
                                    <span class="team_post"><?php the_field('designation');?></span>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>
                <?php
             $i++;
            }
          }wp_reset_postdata();
          ?>
            </div>
        </div>
    </section>







    <!-- team slider end -->

    
<?php get_footer(); ?>