/home/awneajlw/www/decenttraders.online/wp-content/themes/diziti/single-project.php
<?php get_header();
    $data    = \DIZITI\Includes\Classes\Common::instance()->data('single-project')->get();
    
	$layout = $data->get('layout');
    $sidebar = $data->get('sidebar');
    $layout = ($layout) ? $layout : 'right';
    $sidebar = ($sidebar) ? $sidebar : 'default-sidebar';
    if (is_active_sidebar($sidebar)) {
        $layout = 'right';
    } else {
        $layout = 'full';
    }
    $class = (!$layout || $layout == 'full') ? 'col-xl-12 col-lg-12' : 'col-12 col-lg-8';
    $options = diziti_WSH()->option();

    do_action('diziti_banner', $data);
    $allowed_tags = wp_kses_allowed_html('post');
?>

<!-- Start Single Case Studies -->
<section class="project-details-section fix section-padding">
	<div class="container">
		<div class="project-details-wrapper style1">
			<div class="row g-4">
			
			<?php if( $data->get( 'layout' ) == 'left' ): ?>
            <!--Start  Sidebar-->
            <div class="col-12 col-lg-4 <?php if ( $data->get( 'layout' ) == 'left' ) echo 'left-sidebar'; elseif ( $data->get( 'layout' ) == 'right' ) echo 'right-sidebar'; ?>">
                <div class="project-details-sidebar">
                    <?php dynamic_sidebar( $sidebar ); ?>
                </div>
            </div>
            <?php endif; ?>
			
			
			<?php 
				while (have_posts()) : the_post(); 
			?>
			
            <div class="<?php echo esc_attr( $class ); ?>">
				<div class="project-details-items">
					<?php if(has_post_thumbnail()){ ?>
					<div class="details-image img-custom-anim-left">
						<?php the_post_thumbnail('full'); ?>
					</div>
					<?php } ?>
					<div class="details-content">
						<h3 class="wow fadeInUp" data-wow-delay=".5s"><?php the_title(); ?></h3>
						<?php the_content(); ?>
					</div>
				</div>

				<?php if((get_previous_post()) || (get_next_post())): ?>
				<!-- Preview section Start-->
				<div class="preview-area wow fadeInUp" data-wow-delay=".4s">
					<?php global $post; $prev_post = get_previous_post();
						if (!empty($prev_post)):
					?>
					<a href="<?php echo esc_url(get_the_permalink($prev_post->ID)); ?>" class="preview-item">
						<i class="fa-regular fa-angle-left"></i>
						<?php esc_html_e('Previous post', 'diziti'); ?>
					</a>
					<?php endif; ?>
					<?php global $post; $next_post = get_next_post();
						if (!empty($next_post)):
					?>
					<a href="<?php echo esc_url(get_the_permalink($next_post->ID)); ?>" class="preview-item">
						<?php esc_html_e('Next post', 'diziti'); ?>
						<i class="fa-regular fa-angle-right"></i>
					</a>
					<?php endif; ?>
				</div>
				<!-- Preview section End -->
				<?php endif; ?>
				
			</div>
			<?php endwhile; ?>
			
			<?php if( $data->get( 'layout' ) == 'right' ): ?>
            <!--Start  Sidebar-->
            <div class="col-12 col-lg-4 <?php if ( $data->get( 'layout' ) == 'left' ) echo 'left-sidebar'; elseif ( $data->get( 'layout' ) == 'right' ) echo 'right-sidebar'; ?>">
                <div class="project-details-sidebar">
                    <?php dynamic_sidebar( $sidebar ); ?>
                </div>
            </div>
            <?php endif; ?>
			</div>
        </div>
    </div>
</section>
<!-- End Single Case Studies -->


<?php get_footer(); ?>