<?php
/**
 * The template for displaying all single posts and attachments
 *
 * @package WordPress
 * @subpackage menda
 * @since menda Theme 1.0
 */
get_header();
global $post;
$status  = get_post_meta( $post->ID, '_ebid_sidebar_status', true );
?>
	<div class="bradscrum">
		<div class="container-fluid">
			<div class="row">
				<?php ebid_breadcrumbs(); ?>
			</div>
		</div>
	</div>

	<!-- <div id="single-blog"  class="container-fluid"> -->
	<div class="container-fluid">
		<div class="col-md-12">
			<div class="row">

				<div class="col-sm-12 single col-md-<?php if( $status == 'hide' ){ echo '12'; }else{ echo '9'; } ?> col-lg-<?php if( $status == 'hide' ){ echo '12'; }else{ echo '9'; } ?> col-xs-12">
					<div id="products" class="list-group p-3">
						<div class="row">
					
							<?php
								// Start the loop.
								while ( have_posts() ) : the_post();

									// Include the single post content template.
									get_template_part( 'blog/content', 'single' );

									// If comments are open or we have at least one comment, load up the comment template.
									if ( comments_open() || get_comments_number() ) 
									{
										comments_template();
									}

									if ( is_singular( 'attachment' ) ) 
									{
										// Parent post navigation.
										the_post_navigation( array(
											'prev_text' => wp_kses( __( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'menda') ),
										) );
									}
									elseif ( is_singular( 'post' ) ) 
									{
										// Previous/next post navigation.
										the_post_navigation( array(
											'next_text' => '<span class="meta-nav button" aria-hidden="true">' . esc_html__( 'Next', 'menda' ) . '</span> ' .
												'<span class="screen-reader-text">' . esc_html__( 'Next :', 'menda' ) . '</span> ' .
												'<span class="post-title">%title</span>',
											'prev_text' => '<span class="meta-nav button" aria-hidden="true">' . esc_html__( 'Previous', 'menda' ) . '</span> ' .
												'<span class="screen-reader-text">' . esc_html__( 'Previous :', 'menda' ) . '</span> ' .
												'<span class="post-title">%title</span>',
										) );
									}
									// End of the loop.

								endwhile;
							?>
						</div>
					</div>
				</div>

				<?php if ( $status !== 'hide' ) { ?>
					<div class="col-sm-12 right-shop col-md-3 col-lg-3 col-xs-12">
					      <div class="sidebar-bg">
				            <div class="sidebar-shop">
				            	<?php get_sidebar();   ?>
				            </div>    
				         	<div class="clearfix"></div>
						 </div>
					</div>
				<?php } ?>
			</div>
		</div>
		
		<div class="Edit_link">
			<?php
				edit_post_link(
				sprintf(
				/* translators: %s: Name of current post */
				__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'menda' ),
				get_the_title()
				),
				'<span class="edit-link">',
				'</span>'
				);
			?>
		</div>

	</div><!-- .container-fluid -->

<?php get_footer(); ?>
