<?php
 /**
 * The sidebar containing the main widget area
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Buzz_Agency
 */
global $post;
$buzz_agency_sidebar_class = 'right-sidebar';
if ( is_singular() ){
	$buzz_agency_sidebar_class =  get_post_meta( $post->ID, 'buzz_agency_sidebar_layout', true );	
	if ( empty( $buzz_agency_sidebar_class ) ){
		$buzz_agency_sidebar_class = 'right-sidebar';
	}
} else{
	$buzz_agency_sidebar_class = get_theme_mod('buzz_agency_archive_setting_sidebar_option','right-sidebar');
}

if ( 'no-sidebar' == $buzz_agency_sidebar_class || ! is_active_sidebar( 'buzz-agency-sidebar-left' ) ) {
	return;
}
 
if( $buzz_agency_sidebar_class =='left-sidebar' || $buzz_agency_sidebar_class =='both-sidebar' ){ ?>
	<div id="secondary-left" class="custom-col-4">
		<?php if ( is_active_sidebar( 'buzz-agency-sidebar-left' ) ) :
			dynamic_sidebar( 'buzz-agency-sidebar-left' ); 
		endif; ?>
	</div>
<?php } ?>