<?php defined('ABSPATH') or die('No Script Cuddies');
/*
Template Name: Conteudo Normal
*/
global $post;
$copypost=$post;
get_header();
$img=(wp_get_attachment_image_src(get_post_thumbnail_id())!==false)?wp_get_attachment_image_src(get_post_thumbnail_id(),'full'):wp_get_attachment_image_src(get_post_thumbnail_id(get_bloginfo('page_on_front')),'full');
?>
<div class="coloured-madness-cast">
	<div class="container">
		<div class="spacer-85"></div>
		<div class="cast-container">
			<div class="cast-tabs row">
				<h3 align="center"><?=the_title();?></h3>
			</div>
		</div>
		<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">
							<?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>
				</div>
			</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();
