<?php

/**
 * The template for displaying pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that
 * other "pages" on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage menda
 * @since menda Theme 1.0
 */

get_header(); 

global $post;

$status       = get_post_meta( $post->ID, '_ebid_sidebar_status', true );
$breadcrumbs  = get_post_meta( $post->ID, '_ebid_breadcrumbs_status', true );
?>
	
<?php if ( ! is_front_page() && $breadcrumbs !== 'hide'  ): ?>
	<div class="bradscrum">
		<div class="container-fluid">
			 <div class="row"><?php ebid_breadcrumbs(); ?></div>
		</div>
	</div>
<?php endif; ?>

<div class="clearfix"></div>

<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 px-3">
					<div class="row">

						<?php
							// Start the loop.
							while ( have_posts() ) : the_post();

								// Include the page content template.

								get_template_part( 'template-parts/content', 'page' );

								// If comments are open or we have at least one comment, load up the comment template.

								if ( comments_open() || get_comments_number() ) {

									comments_template();
								}

								// 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 endif; ?>
		</div>
	</div>
</div>

<?php get_footer(); ?>