Current File : /home/quantums/durdanatariq.com/wp-content/themes/durdana/homepage.php
<?php 
/* Template Name: Home Page */ 
get_header();
?>
<section class="banner">

    <div id="carousel-example-generic" class="carousel slide carousel-fade" data-ride="carousel">    

    <!-- Wrapper for slides -->

      <div class="carousel-inner tm-carousel-inner">



        <?php





      $args = array(

       'numberposts' => -1,

       'offset' => 0,



       'orderby' => 'post_date',

       'order' => 'ASC',

       'include' => '',

       'exclude' => '',

       'meta_key' => '',

       'meta_value' => '',

       'post_type' => 'banner',

       'post_status' => 'draft, publish, future, pending, private',

       'suppress_filters' => true

      );

      $j = 1;

      $banner = wp_get_recent_posts( $args, ARRAY_A );

      foreach ( $banner as $banner ) {







       $image = wp_get_attachment_image_src( get_post_thumbnail_id( $banner[ 'ID' ] ), 'single-post-thumbnail' );







       ?>   





        <div class="carousel-item <?php if($j==1) {?>active <?php } ?>">

            <div class="tm-carousel-caption">

              <div class="container">

                <div class="row">

                    <?php echo $banner['post_content'];?>   

                </div>

              </div>  

            </div>         

            <div class="tm-banner-img">

              <img src="<?php echo $image[0] ?>" alt="" class="img-fluid"> 

            </div>

        </div>     





        <?php $j++;} ?>      

      </div>     

    </div>

  </section>

  <section class="tm-text-field"> <!-- style="background-image: url(<?php echo get_template_directory_uri(); ?>/images/video-section-bg.jpg);" -->

    <div class="container">      

      <div class="tm-sec-header text-center">

       <?php echo get_post_meta(get_the_ID(),'wpcf-text-field',true);?>      

      </div>

      <div class="row">

         <?php

      $args = array(

       'numberposts' => -1,

       'offset' => 0,

       'orderby' => 'post_date',

       'order' => 'ASC',

       'include' => '',

       'exclude' => '',

       'meta_key' => '',

       'meta_value' => '',

       'post_type' => 'text-field',

       'post_status' => 'draft, publish, future, pending, private',

       'suppress_filters' => true

      );

      $j = 1;

      $banner = wp_get_recent_posts( $args, ARRAY_A );

      foreach ( $banner as $banner ) { 

        $feature = get_post_meta($banner['ID'],'wpcf-text-field',true);

        if($feature == "Yes"){          

          $src = get_post_meta($banner['ID'],'wpcf-text-field',true);

        ?>

        <div class="col-md-4">

          <div class="tm-text-field-panel">

            <div class="tm-text-field-text">

              <h2 class="tm-h2"><?php echo $banner['post_title'];?> </h2>

              <p class="demo"><?php echo $banner['post_content'];?> </p>

            </div>

          </div>

        </div>

        <?php $j++; } 

        }

        ?>

  </section>

  <section class="tm-about-us-main" style="background-image: url(<?php echo get_template_directory_uri(); ?>/images/about-bg.jpg);">

    <div class="container">

      <div class="tm-about-us">

        <div class="row">

          <div class="col-md-4">

            <div class="tm-about-us-img">

              <img src="<?php echo get_post_meta(get_the_ID(),'wpcf-about-image',true);?>" alt="" class="img-fluid">

            </div>             

          </div>

          <div class="col-md-8 d-flex">

            <div class="tm-about-us-text align-self-center">

             <?php echo get_post_meta(get_the_ID(),'wpcf-about-content',true);?>

            </div>

          </div>

        </div>

      </div>    

    </div>

  </section>

  <section class="tm-letest-news-events">

    <div class="container">      

      <div class="row">

        <div class="col-md-8 offset-md-2">

          <div class="tm-sec-header text-center">

            <?php echo get_post_meta(get_the_ID(),'wpcf-latest-news-content',true);?>

          </div>

        </div>



        <?php

          $args = array(

           'numberposts' => -1,

           'offset' => 0,



           'orderby' => 'post_date',

           'order' => 'ASC',

           'include' => '',

           'exclude' => '',

           'meta_key' => '',

           'meta_value' => '',

           'post_type' => 'post',

           'post_status' => 'draft, publish, future, pending, private',

           'suppress_filters' => true

          );

          $j = 1;

          $banner = wp_get_recent_posts( $args, ARRAY_A );

          foreach ( $banner as $banner ) { 



            $image = wp_get_attachment_image_src( get_post_thumbnail_id( $banner[ 'ID' ] ), 'single-post-thumbnail' ); 



            $feature = get_post_meta($banner['ID'],'wpcf-feature-vide0',true);



             if($feature == "Yes" && $j<=6){

            ?>   



            <div class="col-md-4">

              <div class="tm-letest-news-events-panel">

                <a href="<?php echo get_the_permalink($banner[ 'ID' ]);?>">

                  <img src="<?php echo $image[0] ?>" alt="" class="img-fluid">

                </a>

              </div>  

            </div>



           <?php 



                  $j++;

              }



           } ?> 





            

      </div>

      <div class="tm-letest-news-events-post text-center">

         <?php echo get_post_meta(get_the_ID(),'wpcf-news-button',true);?>

      </div>

    </div>

  </section>

  <section class="tm-dental-video"> <!-- style="background-image: url(<?php echo get_template_directory_uri(); ?>/images/video-section-bg.jpg);" -->

    <div class="container">      

      <div class="tm-sec-header text-center">

       <?php echo get_post_meta(get_the_ID(),'wpcf-video-content',true);?>      

      </div>

      <div class="row">



         <?php





      $args = array(

       'numberposts' => -1,

       'offset' => 0,



       'orderby' => 'post_date',

       'order' => 'ASC',

       'include' => '',

       'exclude' => '',

       'meta_key' => '',

       'meta_value' => '',

       'post_type' => 'our-video',

       'post_status' => 'draft, publish, future, pending, private',

       'suppress_filters' => true

      );

      $j = 1;

      $banner = wp_get_recent_posts( $args, ARRAY_A );



      foreach ( $banner as $banner ) { 



        $feature = get_post_meta($banner['ID'],'wpcf-feature-vide0',true);



        if($feature == "Yes"){

          

          $src = get_post_meta($banner['ID'],'wpcf-video-src',true);

        ?>



        <div class="col-md-4">

          <div class="tm-dental-video-panel">

            <video

              id="vid<?php echo $j;?>"

              class="video-js vjs-default-skin"

              controls

              width="" height=""

              data-setup='{ "techOrder": ["youtube"], "sources": [{ "type": "video/youtube", "src": "<?php echo $src;?>"}] }'>

            </video>

            <div class="tm-dental-video-panel-text">

              <h6 class="tm-h6"><?php echo $banner['post_title'];?> </h6>

              <p class="demo"><?php echo $banner['post_content'];?> </p>

            </div>

          </div>

        </div>





        <?php $j++; } 



        }

        ?>





      </div>

      <div class="text-center">

        <?php echo get_post_meta(get_the_ID(),'wpcf-video-button',true);?> 

      </div>

    </div>

  </section>

  <section class="tm-testimonials" style="background-image:url(http://durdanatariq.com/wp-content/uploads/2019/03/homeo_testimonials.png);">

    <div class="container">

     <div class="row">

       <div class="col-md-8 offset-md-2">

          <div id="tm-testimonials-carousel" class="owl-carousel owl-theme">



          <?php

          $args = array(

           'numberposts' => -1,

           'offset' => 0,



           'orderby' => 'post_date',

           'order' => 'ASC',

           'include' => '',

           'exclude' => '',

           'meta_key' => '',

           'meta_value' => '',

           'post_type' => 'testimonial',

           'post_status' => 'draft, publish, future, pending, private',

           'suppress_filters' => true

          );

          $j = 1;

          $banner = wp_get_recent_posts( $args, ARRAY_A );

          foreach ( $banner as $banner ) {?>  

          <div class="item">

            <div class="tm-testimonials-carousel-panel text-center">

              <h3 class="tm-h3">"<?php echo $banner['post_content'];?>"</h3>

            </div>  

          </div>

          

          <?php } ?>                                    

        </div> 

       </div>

     </div>

    </div>

  </section>

  <section class="tm-meet-bob" style="background-image:url(http://durdanatariq.com/wp-content/uploads/2019/03/homeopath-home-1.jpg);">

 
    <div class="container">

      <div class="row">

        <div class="col-md-9 offset-md-2">

          <div class="tm-meet-bob-left">

            <img src="<?php echo get_post_meta(get_the_ID(),'wpcf-meet-image',true);?>" alt="" class="img-fluid">

          </div> 

          <div class="tm-meet-bob-right">

            <?php echo get_post_meta(get_the_ID(),'wpcf-meet-content',true);?>

          </div> 

        </div>

      </div>  

    </div>

  </section>











<?php 

get_footer();