<?php
/*
Theme Designed By: Meysam Hosseinkhani
Email: Meysam98@Gmail.com
Author Website: Hosseinkhani.ir
*/
/*
 * Template Name: Blank Page 2
 */
// Exit if accessed directly
__( 'Blank Page 2', 'dina-kala' );
dfile_check();

if (!defined('ABSPATH')) {
    exit;
}
global $di_data;
get_header(); 
$pside = get_post_meta( get_the_ID(), 'dina_pageside', true );
$content_sticky = ($di_data['side_sticky'] ? ' content-sticky' : '');
if(is_cart() || is_checkout()) {
    $row = '';
    $article = 'col-12'.$content_sticky;
} elseif($pside == '') {
    if($di_data['page_side']==0) {
        $row = '';
        $article = 'col-12'.$content_sticky;
    } elseif($di_data['page_side']==1) {
        $row = '';
        $article = 'col-lg-9 col-12'.$content_sticky;
    } elseif($di_data['page_side']==2){
        $row = ' right-side';
        $article = 'col-lg-9 col-12'.$content_sticky;
    }
} elseif($pside == 'lside') {
    $row = '';
    $article = 'col-lg-9 col-12'.$content_sticky;
} elseif($pside == 'rside') {
    $row = ' right-side';
    $article = 'col-lg-9 col-12'.$content_sticky;
} elseif ($pside == 'wside') {
    $row = '';
    $article = 'col-12'.$content_sticky;
}
?>
<div class="container main-con">
<?php if($di_data['show_bread']) { woocommerce_breadcrumb(); } ?>
<div class="row page-row<?php echo $row; ?>">
<?php if ( have_posts() ) : ?>
<article role="main"  class="<?php echo $article; ?>">
<?php while ( have_posts() ) : the_post(); ?>

    <?php the_content(); ?>
    
<?php endwhile; ?>

</article>
<?php endif; 

if(is_cart() || is_checkout()) {
    //Do Nothing!
} elseif ( $pside == '' && $di_data['page_side'] > 0 ) {
    get_sidebar();
} elseif ( $pside != 'wside' && $pside != '' ) {
    get_sidebar();
} ?>

</div>
</div>
<?php get_footer();