<?php
/* Template Name: Service*/  

get_header(); 
global $variable ;
while ( have_posts() ) : the_post(); 
$feat_image_slider_list = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID()) ); 
?>
<section class="featured-service sec-padding">
  <div class="container">
    <div class="row">
        <?php 
           		 $k=1;
                $service_list = array( 'post_type' => array('service_list'), 'order_by' => 'id', 'order' => 'ASC', 'posts_per_page'   => -1 );
                      $posts_service_list =  get_posts( $service_list );
        
                foreach( $posts_service_list as $servicesnew_list)                      
                { 
        
                    $feat_image_service_list = wp_get_attachment_url( get_post_thumbnail_id($servicesnew_list->ID) ); 
                ?>
                
        
                    <div class="col-md-6 col-sm-12 col-lg-4 col-xl-4">
                        <div class="service-box">
                          <div class="service-box-img">
                            <img src="<?php echo $feat_image_service_list; ?>">
                          </div>
                          <div class="service-box-content text-center">
                            <h3><?php  echo get_post_field('post_title',$servicesnew_list->ID); ?></h3>
                            <!--<p> <?php  //echo substr(get_post_field('post_content',$servicesnew_list->ID),0,100); ?></p>-->
                            <a href="<?php echo get_the_permalink($servicesnew_list->ID); ?>">Read More</a>
                          </div>
                        </div>
                      </div>
                <?php } ?>
    </div>
  </div>
</section>
<?php 
endwhile;
get_footer();?>