<?php get_header(); ?>

	
<main id="main-content">

	
	<!-- function to run before the content -->
		<?php if (have_posts()): while (have_posts()) : the_post(); ?>

		
	<!-- article Mountain Living -->
			
		<?php if (in_category('mountain-living')) { ?>
			

		<h1><?php the_title(); ?> </h1>
							
		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<section id="mountain-living-banner" class="wrapper">
			<div class="feature-img-wrapper">
			<div class="feature-img">
			<?php 

			$image = get_field('banner_image');

			if( !empty($image) ): ?>

			<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />

			<?php endif; ?>
			</div>
			</div>
			</section>
				
			<div class="feature-wrapper">
			<?php the_content(); // Dynamic Content ?>
					
			</div>
				
		</article>
						
			<?php  } //end if in mountain-living ?>
			<!-- article Mountain Living ends -->


<!-- SUMMER FEATURES -->


		<!-- Summer Resort Reviews -->
			  <?php if (in_category ('summer-resorts')) { ?>
		
<!-- start The Location -->		
	<section id="s-location-image">
					
					<figure> 
							<?php 	$image = get_field('summer_location_image');
							if( !empty($image) ): ?>
							<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
							<?php endif; ?>
						<h2><span>The location</span></h2>
					</figure>
	</section>				
	<section id="s-location"> 
			<div class="content-container">
			
			<div class="inprofile2col">
			<div class="content">	
				<?php $location = get_post_meta( $post->ID, 'summerlocation', true ) ; ?>
				<?php if (! empty($location)) { ?>
				<?php echo get_post_meta( $post->ID, 'summerlocation', true ) ; ?>
				<? } ?>
			</div>
			</div>

			
<!-- end The Location -->
	
		<!-- start location Stats -->
		
			
				<div class="inprofile2col">
						<h2 class="xl-hdr_bordertops">Getting There</h2>
						<div class="content">
						<span class="statsbox_text"><?php echo get_post_meta( $post->ID, 'gettingthere', true) ; ?></span>
						<div class="heading_borderbots"></div>
				</div>
				</div>
				
	</section>
<!-- end location stats -->


<!-- Start The Summer Village -->
	<section id="s-village">	
				<div class="content-container">
					<figure>
						<?php 	$image = get_field('summer_village_image');
						if( !empty($image) ): ?>
						<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
						<?php endif; ?>
					</figure>
						<h2>The village</h2>
				</div>
			
	
				<div class="content-container">
					<div class="inprofile2col">
					<div class="content">
						<?php $summervillage = get_post_meta( $post->ID, 'summervillage', true ) ; ?>
						<?php if ( ! empty($summervillage)) { ?>
						<?php echo get_post_meta( $post->ID, 'summervillage', true ) ; ?>
						<? } ?>
					</div>
					</div>	
			
		
			<!-- start village inprofile -->
			<div class="inprofile2col">
				<h2 class="xl-hdr_bordertops">Staying There</h2>
			
			<!-- Staying There -->
					<div class="hearts_box">
					
					<span class="ip_stayingthere_summer_value">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_stayingthere_summer_value', true ) ; ?>"> Value for Money</span>
					</span>
					<span class="ip_stayingthere_summer_accom">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_stayingthere_summer_accom', true ) ; ?>"> Accommodation</span>
					</span>
					<span class="ip_stayingthere_summer_diningout">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_stayingthere_summer_diningout', true ) ; ?>"> Dining Out</span>
					</span>
					<span class="ip_stayingthere_summer_nightlife">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_stayingthere_summer_nightlife', true ) ; ?>"> Nightlife</span>
					</span>
					<span class="ip_stayingthere_summer_charm">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_stayingthere_summer_charm', true ) ; ?>"> Village Charm</span>
					</span>
					</div>
					<div class="content">
				<p>See our Recommendations below for suggestions.</p>
					</div>
						<div class="famplus_logo">
								<?php if( get_field('famille_plus') ): ?>
									<?php 
								$image = get_field('famille_plus_logo');
								if( !empty($image) ): ?>
								<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
								<?php endif; ?>
								<p><strong><?php echo get_post_meta( $post->ID, 'ip_name', true ) ; ?> is a Famille Plus resort</strong></p>
								<p><a href="http://www.familleplus.fr" target="blank">Famille Plus</a> is a national label awarded to tourist destinations offering a special welcome and services tailored to families and children.</p>
								<?php endif; ?>
							</div>
				
				</div>
				
	</section>
<!-- end village inprofile -->

<!-- Start Summer Resort Activities -->
		<section id="s-activities">
					<div class="content-container">
						<figure>
								<?php 	$image = get_field('summer_activities_image');
								if( !empty($image) ): ?>
								<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
								<?php endif; ?>
						</figure>
						<h2>Summer Activities</h2>
					</div>
					
			
				<div class="content-container">
					<div class="inprofile2col">
						<div class="content">
						<?php $resortactivities = get_post_meta( $post->ID, 'resortactivities', true ) ; ?>
						<?php if ( ! empty($resortactivities)) { ?>
						<?php echo get_post_meta( $post->ID, 'resortactivities', true ) ; ?>
						<? } ?>
						</div>
					</div>
			
		<!-- ends Resort Activities content-->
		
			<!-- start  Resort Activities inprofile -->
			<div class="inprofile2col">
			
				<h2 class="xl-hdr_bordertops">Activities There</h2>
				<div class="hearts_box">
					<div class="content">
					<span class="ip_attractions">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_attractions', true ) ; ?>"> Attractions</span>
					</span>
					<span class="ip_walking">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_walking', true ) ; ?>"> Walking</span>
					</span>
					<span class="ip_cycling">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_cycling', true ) ; ?>"> Cycling</span>
					</span>
					<span class="ip_activities">
						<span class="hearts-<?php echo get_post_meta( $post->ID, 'ip_activities', true ) ; ?>"> Activities</span>
					</span>
				
					</div>
				
	

					</div>
			
			
			<!-- end activities inprofile -->
		</div>

	</section> 
<!-- Ends Summer Resort Reviews inprofile -->

			

<!-- start Summer Resort extra info -->
	<section id="s-extrainfo" class="extended-wrapper">
	
				<div class="content-container">
					<div class="inprofile3col">
							<h3>Yes please...</h3>
							<div class="content">
							<span class="ip_bulletpts"><?php echo get_post_meta( $post->ID, 'summer_goodpoints', true ) ; ?></span>
					</div>
					</div>
					<div class="inprofile3col">
							<h3>Yes but...</h3>
							<div class="content">
							<span class="ip_bulletpts"><?php echo get_post_meta( $post->ID, 'summer_badpoints', true ) ; ?></span>
					</div>
					</div>
					<div class="inprofile3col">
							<h3>Our Tips</h3>
							<div class="content">
							<span class="ip_bulletpts"><?php echo get_post_meta( $post->ID, 'summer_ourtips', true ) ; ?></span>
					</div>
					</div>		
					
					</div>

	
	</section>
<!-- end Summer Resort extra info -->

<!-- end Summer Resort Review intro panels section -->
<hr class="divider">

	<!-- Summer Resort Review main article -->
		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
				<div class="feature-wrapper">	

				<?php the_content(); // Dynamic Content ?>
					
				</div>
				</article>
	

				<?php } //end if in Summer Resort Reviews ?>
			


		<!-- article Summer Activities -->
			<?php if (in_category ('summer-activities')) { ?>
	

		<h1><?php the_title(); ?> </h1>
			<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<div class="feature-wrapper">	

					<?php the_content(); // Dynamic Content ?>
						
					</div>
			</article>
	
			<?php } //end if in Summer Activities ?>
	
	

		<!-- article Scenic Touring -->
					<?php if (in_category('scenic-touring')) { ?>
			

		<h1><?php the_title(); ?> </h1>
				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
						<div class="feature-wrapper">	

						<?php the_content(); // Dynamic Content ?>
							
						</div>
				</article>
						

					<!-- Origins of the route begins -->
					<div class="content-container">
						<?php if( get_field('routehistory')): ?>
						<div class="inprofile2col">
						<h2>Origins of the Route</h2>
						<span class="content">
						<?php echo get_post_meta( $post->ID, 'routehistory', true ); ?></span>
						</div>
						<?php endif; ?><!-- Ends Origins of the route-->

						<!-- Starts Useful addresses  -->
						<?php if( get_field('usefuladdresses') ): ?>
						<div class="inprofile2col">
						<h2>Useful Addresses</h2>
						<span class="content">
						<?php echo get_post_meta( $post->ID, 'usefuladdresses', true ) ; ?></span>
						</div>
						<?php endif; ?>	<!-- ends Useful addresses -->

					</div>
				
			
					<?php } //end if in Scenic Touring ?>




<!-- article parent category News & Offers, categories ski deals, ski news, property news -->
<!-- Single post with sidebar -->

<?php if (in_category('news-offers')) { ?>


<section class="wrapper">
			<div class="feature-img-wrapper">
			<div class="feature-img">
			<?php 

			$image = get_field('banner_image');

			if( !empty($image) ): ?>

			<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />

			<?php endif; ?>
			</div>
			</div>
			</section>



<section id="news-offers">
<div class="newswrapper container">
<div class="newswrap-inside">
<div class="news-container">
		<h2><?php the_title(); ?> </h2>
								
		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
				
			<?php the_content(); // Dynamic Content ?>
		</article>
	</div>
		
	<div id="sidebar-primary">
	<div id="sidebar-top-div"></div>
	<div id="sidebar-content">

<!-- excludes smart currency single post (iframe) -->	
	<?php 
if(is_single('currency-zone')) {
   // nothing
} else {
   get_sidebar('primary');
} 
 ?>

	<div id="sidebar-bottom-div"></div>
	</div>
	</div>

	</div>
	</div>

</section>
<?php  }// end if in news & offers ?>
<!-- Ends news & offers articles -->


	
	
<!--Practical info sections-->
<?php $this_cat = get_the_category($post->ID); $this_cat_slug = $this_cat[0]->slug; ?>
<?php if ($this_cat_slug != 'news-offers') : /* || $this_other_slug != 'other-category' */ ?>
	<section id="practical-information" class="wrapper">
			<h2 class="xl-hdr_bordertopw">Practical Information</h2>
					<div class="content-container">
		
		<!-- Essential Info Starts-->
		<!-- Getting there begins -->	
			<?php if( get_field('gettingthere') ): ?>
			<div class="inprofile3col">
			<h2>Getting there</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'gettingthere', true ) ; ?></span>
			</div>
			<?php endif; ?><!-- ends Getting there -->
			
		<!-- Where to stay begins -->	
			<?php if( get_field('wheretostay') ): ?>
			<div class="inprofile3col">
			<h2>Where to stay</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'wheretostay', true ) ; ?></span>
			</div>
			<?php endif; ?><!-- ends Where to stay -->
	

		<!-- Where to eat begins -->	
			<?php if( get_field('wheretoeat') ): ?>
			<div class="inprofile3col">
			<h2>Where to Eat</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'wheretoeat', true ) ; ?></span>
			</div>
			<?php endif; ?><!-- ends Where to eat -->


		<!-- Things to do begins -->	
			<?php if( get_field('thingstodo') ): ?>
			<div class="inprofile3col">
			<h2>Things To Do</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'thingstodo', true ) ; ?></span>
			</div>
			<?php endif; ?><!-- ends Things to do -->
			
		<!-- Equipment required begins -->
			<?php if( get_field('equipment') ): ?>
			<div class="inprofile3col">
			<h2>Equipment Required</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'equipment', true ) ; ?></span>
			</div>
			<?php endif; ?> <!-- ends equipment req'd -->

			
			<!-- Food and Drink begins -->
			<?php if( get_field('foodanddrink')): ?>
			<div class="inprofile3col">
			<h2>Food and Drink</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'foodanddrink', true ); ?></span>
			</div>
			<?php endif; ?><!-- Ends Food and Drink-->

			
		<!-- Summer Where to Stay -->
					<?php if( get_field('sfeatures_wheretostay') ): ?>
					<div class="inprofile3col">
					<h2>Where to Stay</h2>
					<span class="content">
					<?php echo get_post_meta( $post->ID, 'sfeatures_wheretostay', true ) ; ?></span>
					</div>
					<?php endif; ?>
					<!-- Ends Summer Where to stay -->

			<!-- Summer Features -->
			<?php if( get_field('sfeatures_info') ): ?>
			<div class="inprofile3col">
			<h2>Useful Information</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'sfeatures_info', true ) ; ?></span>
			</div>
			<?php endif; ?>
			<!-- Ends Summer Useful info -->

			<!-- Summer resort Activities to do -->
			<?php if( get_field('activities') ): ?>
			<div class="inprofile3col">
			<h2>Resort Activities</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'activities', true ) ; ?></span>
			</div>
			<?php endif; ?>
						<!-- Ends Summer Resort Activities to do -->

			

			<!-- Mountain Living Features -->
			<?php if( get_field('livfeatures_info') ): ?>
			<div class="inprofile3col">
			<h2>Information</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'livfeatures_info', true ) ; ?></span>
			</div>
			<?php endif; ?>
		<!-- Ends Mountain Living Useful Info -->
			
			
			<!-- When to Go -->
			<?php if( get_field('whentogo') ): ?>
			<div class="inprofile3col">
			<h2>When to go</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'whentogo', true ) ; ?></span>
			</div>
			<?php endif; ?><!-- ends When to go -->
						

			<!-- Places to visit begins -->
			<?php if( get_field('placestovisit')): ?>
			<div class="inprofile3col">
			<h2>Places to Visit</h2>
			<span class="content">
			<?php echo get_post_meta( $post->ID, 'placestovisit', true ); ?></span>
			</div>
			<?php endif; ?><!-- Ends Places to visit -->
			
			</div><!-- ends content-container -->
			

</section><!-- ends practical info sections-->
<?php endif; // end if slug = news-offers ?>


<!-- Copyright -->
<!-- <section id="copyright" class="wrapper">
	<p class="copyright">
		<?php _e( 'Feature by ', 'html5blank' ); the_author(); ?>, &copy; <?php echo date("Y") ?>
	</p>
</section> -->
<!-- ends copyright -->


<!-- Contextual Related Posts -->
<?php if ( function_exists( 'echo_ald_crp' ) ) echo_ald_crp(); ?>
<!-- Contextual Related Posts end-->


	<?php endwhile; ?>

	<?php else: ?>

	

		<!-- article -->
		<article>

			<h1><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h1>

		</article>
		<!-- /article  -->

	<?php endif; ?>


	
	<!-- ends page content-->

<p><a id="bottom" href="#main-content">Return to top of page.</a></p>
	
	</main><!-- ends main content -->

<script src="https://www.dwin2.com/pub.160812.min.js"></script> <!-- script to render real url on ads -->

<?php get_footer(); ?>