<?php 
/*
Template Name:Home Front Page
*/
get_header(); 
?>
<div class="container-fluid">
  <div class="row">
      <div id="main-banner" class="owl-carousel owl-theme">     
	    <?php 

                       

                           $sliderArgs = array(



                            'post_type' => 'slider-post-type',



                            'posts_per_page' => 2,



                            'orderby' => 'date',



                            'order' => 'DESC'



                        );



                        $sliderQuery = new WP_Query($sliderArgs);



                        if($sliderQuery->have_posts()):



                            while($sliderQuery->have_posts()):



                                    $sliderQuery->the_post(); ?>

            

              <?php  $slider_featuredImg = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'full'); 

               

              ?>
      <div class="item">
      <img src="<?php echo $slider_featuredImg[0];  ?>" width="1600" height="535" alt="banner" />
        <div class="banner-text">
          <p style="text-transform:uppercase;"><?php echo get_the_content(); ?></p>
          <a href="<?php the_field('read_more_link'); ?>">Read More</a> </div>
          </div>
      <?php  endwhile; wp_reset_query();  endif; ?>  
    </div>   
  </div>
</div>
<div class="clear"></div>
<!--Banner Ends -->
<div class="container-fluid go-top-passge">
  <div class="row">
    <div class="container">
      <div class="feature-block">
          <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
		  <?php $img1 = get_field('trials_now_enrolling_image'); ?>
            <div class="f-each orange-span"> <a href="<?php echo home_url() ?>/trials-now-enrolling"> <img src="<?php echo $img1['url']; ?>" alt="feature-image"/>
              <h2>Trials Now Enrolling <i class="fa fa-angle-double-right"></i></h2>
              </a> </div>
          </div>
		   <?php $img2 = get_field('trials_now_enrolling_image'); ?>
          <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <div class="f-each blue-span"><a href="<?php echo home_url() ?>/study-participants"> <img src="<?php  echo $img2['url'];?>" alt="feature-image"/>
              <h2>Study Participants <i class="fa fa-angle-double-right"></i></h2>
              </a></div>
          </div>
      </div><!--feature block -->
      <div class="clear"></div>
      <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 about-block">
      <?php while(have_posts()):the_post(); ?>
	  <?php the_content(); ?>
	  
	  <?php endwhile;?>
        <a href="<?php echo home_url() ?>/about-oncova">Read More >></a>
      </div><!--about-block -->
    </div>
  </div>
</div>
<div class="clear"></div>
<div class="container-fluid gradient-block">
	<div class="row">
    	<div class="container">
        	<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 benefit-block">
            	<h3>Benefits of clinical trial study participation</h3>
                <?php the_field('benefits_of_clinical_trial_study'); ?>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 benefit-form">
            	<h3>Submit form to get started</h3>
             <?php echo do_shortcode('[contact-form-7 id="4" title="Home Page Get Started Form"]'); ?>
            </div>
        </div>
    </div>
</div><!--beneficiary & Form block -->
<div class="clear"></div>
<div class="container-fluid">
	<div class="row">
    	<div class="container sponsor-block">
        	<h2>Sponsor’s & CRO’s</h2>
        	<div class="sponsors">  
<?php

// check if the repeater field has rows of data
if( have_rows('sponsor') ):

 	// loop through the rows of data
    while ( have_rows('sponsor') ) : the_row();
?>	
<?php $logo = get_sub_field('sponsor_logo'); ?>
   				<div class="item"><img src="<?php echo $logo['url'];  ?>"  alt="sponsors" /></div>
   <?php   endwhile;

else :

    // no rows found

endif;

?>         
			</div>
        </div>
    </div>
</div><!--sponsor slider -->
<div class="clear"></div>
	

<?php get_footer(); ?>