<?php defined('ABSPATH') or die('No Script Cuddies');
/*
Template Name: Contactos
*/
global $post;
$copypost=$post;
get_header();
?>
<div class="coloured-madness-cast">
	<div class="container">
		<div class="spacer-85"></div>
		<div class="row">
			<div class="col-xs-12">
				<h3><?php the_title();?></h3>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-12 col-md-6 col-lg-4">
				<?=do_shortcode(get_field('formulario_de_contactos'));?>
			</div>
			<div class="col-xs-12 col-md-6 col-lg-8">
				<?php 
					$post=$copypost;
					$content = get_the_content($post->ID);
					if($content==''){
						$content = apply_filters( 'the_content', $post->post_content );
						$content = str_replace( ']]>', ']]&gt;', $content );
					}
					echo $content;
				?>
			</div>
		</div>
		<?php 
		if(is_user_logged_in()){
			?>
		<div class="cast-container">
			<div class="row">
				<div class="col-xs-12 col-md-6 col-lg-12">
					<div class="cast-tabs row no-margin-removal">
						<div class="col-xs-12">
							<a class="button" href="<?php echo get_edit_post_link( $id, $context ); ?>">
								<?=__('Edit This Post',tdomain);?>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
			<?php
		} ?>
	</div>
</div>
<?php
get_footer();

