<?php get_header(); ?>
<div class="row main-estrutura2">
	<div class="col-md-7 layout-main-content">
		
		
		<?php if ( ! have_posts() ) : ?>
			<div id="post-0" class="post not-found post-listing">
				<h1 class="post-title"><?php _e( 'Not Found', 'oriont' ); ?></h1>
				<div class="entry">
					<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'oriont' ); ?></p>
					<?php get_search_form(); ?>
				</div>
			</div>
		<?php endif; ?>
		
		<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
		<?php $get_meta = get_post_custom($post->ID);
			if( !empty( $get_meta['oriont_review_position'][0] ) ){
				$review_position = $get_meta['oriont_review_position'][0] ;
				$rv = $oriont_reviews_attr;
			}
			
			$post_width = $get_meta["oriont_sidebar_pos"][0];
			if( $post_width == 'full' ) $content_width = 955;
		?>
		<?php //Above Post Banner
		if( empty( $get_meta["oriont_hide_above"][0] ) ){
			if( !empty( $get_meta["oriont_banner_above"][0] ) ) echo '<div class="ads-post">' .htmlspecialchars_decode($get_meta["oriont_banner_above"][0]) .'</div>';
			else oriont_banner('banner_above' , '<div class="ads-post">' , '</div>' );
		}
		?>
		
		<article <?php if( !empty( $rv['review'] ) ) echo $rv['review']; post_class('post-listing post'); ?>>
			<?php oriont_include( 'post-head' ); // Get Post Head template ?>
			<div class="post-inner entry-post-content">
				<h1 class="name post-title entry-title" itemprop="name"><?php the_title(); ?></h1>
				<p class="post-meta"></p>
				<div class="clear"></div>
				<div class="entry">
					<?php if( !empty( $review_position ) && ( $review_position == 'top' || $review_position == 'both'  ) ) oriont_get_review('review-top'); ?>

					<?php the_content(); ?>
					<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'oriont' ), 'after' => '</div>' ) ); ?>
					
					<?php if( !empty( $review_position ) && ( $review_position == 'bottom' || $review_position == 'both' ) ) oriont_get_review('review-bottom'); ?>

					<?php edit_post_link( __( 'Edit', 'oriont' ), '<span class="edit-link">', '</span>' ); ?>
				</div><!-- .entry /-->	
				<span style="display:none" class="updated"><?php the_time( 'Y-m-d' ); ?></span>
				<div style="display:none" class="vcard author" itemprop="author" itemscope itemtype="http://schema.org/Person"><strong class="fn" itemprop="name"><?php the_author_posts_link(); ?></strong></div>

			</div><!-- .post-inner -->
		</article><!-- .post-listing -->
		<?php endwhile; ?>
		
		<?php //Below Post Banner
		if( empty( $get_meta["oriont_hide_below"][0] ) ){
			if( !empty( $get_meta["oriont_banner_below"][0] ) ) echo '<div class="ads-post">' .htmlspecialchars_decode($get_meta["oriont_banner_below"][0]) .'</div>';
			else oriont_banner('banner_below' , '<div class="ads-post">' , '</div>' );
		}
		?>
		
		<?php comments_template( '', true ); ?>
	</div><!-- .content -->

<?php get_sidebar(); ?>
</div><!-- .row -->
<?php get_footer(); ?>