<?php
/**
 * Template Name: Front-Page
 *
 */
 ?>
<?php get_header(); ?>


    <div id="full-content">
            
        <section style="background: url('<?php echo site_url();?>/wp-content/uploads/2018/11/banner_bg.png');"  class="banner">  
            <div class="container home-banner-content">
              <?php the_field('home-banner-content'); ?>                 
            </div>
            <div class="tab-banner">
                <img src="<?php echo site_url();?>/wp-content/uploads/2018/11/banner_bg.png">
            </div>
        </section>
 <div class="clearfix"></div>
        <section class="home-about">
            <div class="container">
                <?php 
                  $id=38; 
                  $post = get_post($id); 
                  $content = apply_filters('the_content', $post->post_content); 
                
                  ?>
                <h3 class="text-uppercase"><?php the_title(); ?></h3>
                <?php echo the_field('home_page_content', 38); ?>
                <a href="<?php echo get_permalink(); ?>" class="mt-4">KNOW MORE</a> 
            </div>
        </section>
         <div class="clearfix"></div>
        <section class="our-team-home">
            <div class="container">
                 <h3>OUR TEAM</h3>
                <div class="team-member-wrap">
					<div class="owl-carousel owl-theme team-carousel">
						<?php
							$type = 'Team';
							$args=array(
							'post_type' => $type,
							'post_status' => 'publish',
							'posts_per_page' => 10,
							'order'    => 'ASC'
							);
							$my_query = null;
							$my_query = new WP_Query($args);                 
							if( $my_query->have_posts() ) {
						?>                    
						<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
							<div class="item">
								<div class="team-member">                            
									<figure><?php the_post_thumbnail(); ?></figure>
									<div class="team-member-desc">
										<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
										<p><?php the_field('designation'); ?>  </p>
										<a href="<?php the_permalink(); ?>" class="view-detail">View Profile</a>
									</div>
								</div>
							</div>
						
						<?php
							endwhile;
						} 
						?>                     
						<?php wp_reset_query();  // Restore global post data stomped by the_post(). ?>    
			  		</div>
                </div>
            </div>
            <div class="clearfix"></div>
        </section>
 <div class="clearfix"></div>
        <section class="resources-home">
            <div class="container">
              <h3>INSIGHTS</h3>
              <div class="resource-home-wrap">
                    <div class="row">
                              <?php
                    $type = 'Resources';
                    $args=array(
                      'post_type' => $type,
                      'post_status' => 'publish',
                      'posts_per_page' => -1,
                      'order'    => 'ASC'
                    );
                    $my_query = null;
                    $my_query = new WP_Query($args);                 
                  if( $my_query->have_posts() ) { ?>   
                  <div class="owl-carousel owl-theme  resources">                 
                      <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
                          
                            <div class="item">
                              <div class="resource-item">
                                     <?php the_post_thumbnail(); ?>
                                    <div class="resources-desc">
                                        <h3><a href="<?php echo get_field('resources-link'); ?>"><?php the_title(); ?></a></h3>
                                        <?php //the_content(); ?>
                                        <a href="<?php echo get_field('resources-link'); ?>" class="view-detail">View All</a>
                                    </div>
                             </div>
                             </div>
                      <?php
                      endwhile;

                    } ?>                     
                  </div>
                    <?php wp_reset_query();  // Restore global post data stomped by the_post().
              ?>    


                </div>
            </div>
            </div>
        </section>
 <div class="clearfix"></div>
         <section class="books-wrap-home">
            <div class="container">
              <h3>BOOKS</h3>
               
               <section class="books-bg">  
                    <?php
                    $type = 'Books';
                    $args=array(
                      'post_type' => $type,
                      'post_status' => 'publish',
                      'posts_per_page' => -1,
                      'order'    => 'ASC'
                    );
                    $my_query = null;
                    $my_query = new WP_Query($args);                 
                  if( $my_query->have_posts() ) { ?>                    
                      <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
                          
                    <div class="book-item">
                      <?php the_post_thumbnail(); ?>
                      <div class="middle"></div>
                      <a href="<?php echo get_field('books-link'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/hover-icon.png" /></a>
                    </div>
                    
                      <?php
                      endwhile;
                    } ?>                     
                    <?php wp_reset_query();  // Restore global post data stomped by the_post().
              ?>    


                  <div class="clearfix"></div>
                  <div class="books-inner-bg">
                      <img src="<?php echo site_url();?>/wp-content/uploads/2018/11/books-bg.png" />
                  </div>
               </section>


          </div>
      </section>
      <div class="clearfix"></div>
     
		<section class="home-seo-section">
            <div class="container">
			  <div class="home-seo-content">
				<?php echo the_field('home_page_seo_content'); ?>
			   </div>		
			</div>
    </section>
    <div class="clearfix"></div>
    <?php 

    $visibility = get_field('display');

  if($visibility== 'Yes'){
                    
?>
    <section class="complain_status">
        <div class="container">
          <div class="row">
            <div class="col-12">



              <div class="complaint_status_wrapper fixed">
                <span class="closebox"></span>
                <div class="complaint_swi">
                  <h5 class="sec_title"><?php the_field('complaint_box_title'); ?></h5>
                 
                <div class="table-responsive">
                <?php 
                  
                  the_field('complaints_status');
                  ?>
                </div>
              </div>
              </div>


          </div>
        </div>
        </div>
      </section>
    
 <div class="clearfix"></div>
  <?php  } ?>
        <section class="contact-home" id="contact-us">
            <div class="container">
              <h3>CONTACT US</h3>

            <div class="home-contact-tabs">
              <!-- <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
                <li class="nav-item">
                  <a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-expanded="true">Distributor</a>
                </li>

                <li class="nav-item">
                  <a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab" aria-controls="pills-profile" aria-expanded="true">Investor</a>
                </li>

              </ul> -->

              <div class="tab-content" id="pills-tabContent">
                <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
                  <?php echo do_shortcode( '[contact-form-7 id="3171" title="Contact As"]' );
                  //for live 3184
                   ?>
                </div>

                <!-- <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
                  <?php //echo do_shortcode( '[contact-form-7 id="29" title="Contact investor"]' ); ?>
                </div> -->

          
              </div>
            </div>


          </div>
      </section>

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