<?php
/*

Template Name: Services

*/
?>
<?php get_header(); ?>
<?php wp_reset_postdata(); ?>
<?php $featuredImageType = get_field('background_image_type'); ?>
<?php setBgImg();  ?>

<main class="content atractionsPage <?php echo $featuredImageType; ?>"> <!-- for image and paralax use headerImg otherwise bgImg -->
<div class="breadcrumb_box"> <div class="container"><?php
echo do_shortcode( '[breadcrumb]' ); 
?></div></div>
	<section class="pageImage">
    
		<?php if($featuredImageType == "bgImg"): ?>	
				<div class="fullBg"></div>
			<?php elseif($featuredImageType == "headerImg"): ?>
				<div class="um_parallax" data-velocity="-.1"></div>
			<?php endif; ?>
	</section>
	
	<div class="container">
		<div class="row">
			<section class="pageTitle text-center">
				<div class="um_helper">
					<div class="um_middle">
						<h3 class="title pageTitle titleUp"><?php the_title(); ?></h3>
					</div>
				</div>
			</section>
			
			
			<section class="articles services">
				<div class="row">
					
					
			
								<?php 	  
									$args = array(
										'post_type' => 	'service_post',
										'orderby'	=>	'menu_order date',
										'order' 	=> 	'DESC',
										'posts_per_page' => -1
									);
									
									$the_Query = new WP_Query($args);
									while ($the_Query->have_posts()):
										$the_Query->the_post();
										
								 ?>
								 
								 
									 	<div class="um_in animated col-md-3 col-sm-4 col-xs-6">
											<article class="servicePostWrapper mainBgColor">
												<a href="<?php the_permalink(); ?>">
													<div class="um_ratio"></div>
													<div class="servicePost text-center">
														<div class="um_helper">
															<div class="um_middle">
																<div class="servicePostContent">
																	<?php if(get_field('service_thumbnail') == "image"): ?>
																		<?php $img = wp_get_attachment_image_src(get_field('image') ,'service_icon')?>
																		<img width="104" height="104" src="<?php echo $img[0]; ?>"/>
																	<?php else: ?>
																		<i class="fa <?php the_field('icon'); ?> brandColor"></i>
																	<?php endif; ?>
																	<h4 class="titleUp title"><?php the_title(); ?></h4>
																	<h6><?php the_field('description'); ?></h6>
																</div>
															</div>
														</div>
													</div>
												</a>
											</article>
										</div>
											
								 <?php endwhile; ?>

			
					
							
				
			
					
					
					
					
				</div>
			</section>
			
		</div>
	</div>
</main>

<?php get_footer(); ?>