<?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
//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/images/breadcrumb/dentalcarebg.jpg"; 
   } 
?>
<!--Start breadcrumb area-->     
<section class="breadcrumb-area" style="background-image: url(<?=$img?>);">
    <div class="banner-curve"></div>
    <div class="container">
        <div class="row">
            <div class="col-xl-12">
                <div class="inner-content clearfix text-center">
                    <div class="title wow slideInUp animated" data-wow-delay="0.3s" data-wow-duration="1500ms">
                       <h2><?php the_title();?><span class="dotted"></span></h2>
                    </div>
                    <div class="breadcrumb-menu wow slideInDown animated" data-wow-delay="0.3s" data-wow-duration="1500ms">
                        <ul class="clearfix">
                            <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a></li>
                            <li class="active"><?php the_title();?></li>
                        </ul>    
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--End breadcrumb area-->
<!--Start Service Details Area-->
<section class="service-details-area">
    <div class="container">
        <div class="row">
            <div class="col-xl-9 col-lg-8">
                <div class="service-details-content">
                    <div class="service-details-text-box">
                        <h2>Dental Care<span class="dotted"></span></h2>
						<div class="service-details-main-image">
                        <img src="assets/images/services/dentalcarepic1.jpg" alt="">
                        </div>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem.</p>
                        
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem.</p>
                    </div>
                    <div class="service-details-bottom-image">
                        <div class="row">
                            <div class="col-xl-6">
                                <div class="single-image-nox">
                                    <img src="assets/images/services/dentalcarepic2.jpg" alt="">
                                </div>
                            </div>
                            <div class="col-xl-6">
                                <div class="single-image-nox">
                                    <img src="assets/images/services/dentalcarepic3.jpg" alt="">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="service-details-bottom-text">
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem.</p>
                    </div>
                </div>
            </div>
            
            <div class="col-xl-3 col-lg-4">
                <div class="service-details-sidebar">
                    <div class="service-details-categories">
                        <div class="title">
                            <h3>Services Category<span class="dotted"></span></h3>
                        </div>
                        <div class="categories-box">
                            <?php echo wp_nav_menu( array( 'theme_location' => 'primary',  'menu_class' => 'categories clearfix' , 'container' => false , 'walker' => new WP_Bootstrap_Navwalker() ) );?>
         <!--                   <ul class="categories clearfix">-->
								 <!--<li class="active"><a href="#">Dental Care</a></li>-->
								 <!--<li><a href="urgentcare.html">Emergency and Urgent Care</a></li>-->
								 <!--<li><a href="#">In-House Laboratory</a></li>-->
								 <!--<li><a href="#">Laser Therapy</a></li>-->
								 <!--<li><a href="#">Parasite Prevention</a></li>-->
								 <!--<li><a href="#">Pharmacy</a></li>-->
								 <!--<li><a href="#">Preventative Care</a></li>-->
								 <!--<li><a href="#">Puppy and Kitten Care</a></li>-->
								 <!--<li><a href="#">Spay and Neuter</a></li>-->
								 <!--<li><a href="#">Surgery</a></li>-->
								 <!--<li><a href="#">Vaccinations</a></li>-->
								 <!--<li><a href="#">Wellness Exams</a></li>-->
								 <!--<li><a href="#">Pet Memorials</a></li>-->
         <!--                   </ul>-->
                        </div>
                    </div>
                    
                    <div class="callto-action-box text-center" style="background-image: url(assets/images/resources/callto-action-box-bg.jpg)">
                        <p>Call To Action</p> 
                        <h3>Enjoy Your Whole<br> Weekend.</h3>
                        <a class="btn-one" href="#"><span class="txt">Appointment</span></a>   
                    </div>
                </div>
            </div>              
        </div>

    </div>
</section>   
<!--End Service Details Area-->




















<!-- Start Breadcrumbs -->
<div class="breadcrumbs overlay" style="background-image:url(<?=$img?>)">
   <div class="container">
      <div class="bread-inner">
         <div class="row">
            <div class="col-12">
               <h2><?php the_title();?></h2>
               <ul class="bread-list">
                  <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a></li>
                  <li><i class="icofont-simple-right"></i></li>
                  <li class="active"><?php the_title();?></li>
               </ul>
            </div>
         </div>
      </div>
   </div>
</div>
<!-- End Breadcrumbs -->
<!-- Our service Start -->
<div class="servicepage" id="servicepage">
   <div class="container">
      <div class="row">
         <div class="col-lg-12 col-md-12 col-sm-12 col-12 text-center">
            <div class="section-heading">
               <h2><?php the_title();?></h2>
            </div>
         </div>
         <?php
            $args = array ( 
                'post_type'      => 'service',
                'post_status'    => 'publish',  
                'orderby' => 'publish_date',
                'order' => 'DESC',  
                'posts_per_page' => -1
            );
            $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());
                $the_cat = get_the_category(get_the_ID());
                $cat_name = $the_cat[0]->name;
          ?>
         <div class="col-lg-4 col-md-4 col-sm-6 col-12">
            <div class="service-item hvr-float-shadow">
               <img src="<?php the_field('small_image'); ?>" alt="">
               <div class="down-content">
                  <h4><?php echo get_the_title();?></h4>
                  <p><?php echo get_the_excerpt();?></p>
                  <a href="<?php the_permalink();?>" class="filled-button">Read More</a>
               </div>
            </div>
         </div>
         <?php
             $i++;
            }
          }wp_reset_postdata();
          ?>
      </div>
   </div>
</div>
<!-- Our service End -->
<?php get_footer(); ?>