<?php
/**
 * Left sidebar check
 *
 * @package Poster
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
// Ensure we're within the loop
// global $wp_query;
// $postid = $wp_query->post->ID;

// $postid = get_the_ID();
// $postID = get_queried_object_id();
//$layoutmeta = get_post_meta(get_the_ID(), '_singlepost_poster', true);
//echo "Layout Meta Valuess: " . $layoutmeta;

// if ('ls' == $layoutmeta || 'lr' == $layoutmeta) {
//     get_template_part( 'global-templates/left-sidebar-check' );
//  }elseif ('fc' == $layoutmeta || 'rsd' == $layoutmeta){

//  }else{
        if (class_exists('woocommerce')) {	
            if(is_cart() || is_checkout() || is_account_page()){
                echo '<div class="col-md-12" content-area" id="primary">';
            }else {
                $sidebar_pos = get_theme_mod( 'poster_sidebar_position' );
            if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) {
                get_template_part( 'sidebar-templates/sidebar', 'left' );
            }
            $colmd = poster_single_colmd(); ?>
            <div class="col-md-<?php echo $colmd; ?> content-area" id="primary"> 
            <?php
            }
        }else{
            $sidebar_pos = get_theme_mod( 'poster_sidebar_position' );
            if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) {
                get_template_part( 'sidebar-templates/sidebar', 'left' );
            }
            $colmd = poster_single_colmd(); ?>
            <div class="col-md-<?php echo $colmd; ?> content-area" id="primary"> 
            <?php
        }
//    }
