<?php
/**
 * 
 * Template Name: internacional
 * 
 */
?>
<?php get_header(); ?>
	<?php if (get_locale() == 'es_PE') {?>
		<section id="destinos" class="contenedor-tg">
			<div class="titulo-tg">
				<div class="container">
					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<h1><span class="tg-airplane"></span>Turismo Internacional</h1>
						</div>
					</div>
				</div>
			</div>
			<div class="container">
				<div class="row">
			<?php
			$args = array(
			    'post_type' => 'turismo',
			    'posts_per_page' => '-1',
				'meta_key' => 'paq-cat',
				'meta_value' => 'Internacional'
			);
			?>
			<?php $the_query = new WP_Query($args); ?>
			<?php if ($the_query->have_posts()) : ?>
			    <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
					<div class="col-md-4 col-sm-4 col-xs-12">
						<a href="<?php the_permalink() ?>">
							<div class="destinos-item">
								<figure>
									<?php $paq_img1= get_field('paq-img1'); ?>
									<img src="<?php echo $paq_img1['url']; ?>" alt="<?php echo $paq_img1['title']; ?>" title="<?php echo $paq_img1['title']; ?>">
								</figure>
								<h2><?php the_field('paq-titulo') ?></h2>
								<div class="destino-txto">
									<?php the_field('paq-parrafo') ?>
								</div>
								<a href="<?php the_permalink() ?>">
									<button class="but but-verde">
										<span class="tg-plus"></span>Ver más
									</button>
								</a>
								<button class="but but-azul">
									<span class="tg-cart"></span>Agregar
								</button>
							</div>
						</a>
					</div>
			    <?php endwhile; ?>
			    <?php wp_reset_postdata(); ?>
			<?php endif; ?>

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

	<?php }else{ ?>
		<section id="destinos" class="contenedor-tg">
			<div class="titulo-tg">
				<div class="container">
					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<h1><span class="tg-airplane"></span>International Tourism</h1>
						</div>
					</div>
				</div>
			</div>
			<div class="container">
				<div class="row">
			<?php
			$args = array(
			    'post_type' => 'turismo',
			    'posts_per_page' => '-1',
				'meta_key' => 'paq-cat',
				'meta_value' => 'Internacional'
			);
			?>
			<?php $the_query = new WP_Query($args); ?>
			<?php if ($the_query->have_posts()) : ?>
			    <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
					<div class="col-md-4 col-sm-4 col-xs-12">
						<a href="<?php the_permalink() ?>">
							<div class="destinos-item">
								<figure>
									<?php $paq_img1= get_field('paq-img1'); ?>
									<img src="<?php echo $paq_img1['url']; ?>" alt="<?php echo $paq_img1['title']; ?>" title="<?php echo $paq_img1['title']; ?>">
								</figure>
								<h2><?php the_field('paq-titulo') ?></h2>
								<div class="destino-txto">
									<?php the_field('paq-parrafo-en') ?>
								</div>
								<a href="<?php the_permalink() ?>">
									<button class="but but-verde">
										<span class="tg-plus"></span>See more
									</button>
								</a>
								<button class="but but-azul">
									<span class="tg-cart"></span>Add
								</button>
							</div>
						</a>
					</div>
			    <?php endwhile; ?>
			    <?php wp_reset_postdata(); ?>
			<?php endif; ?>

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

	<?php } ?>


<?php get_footer() ?>