<?php
/**
 * The template for displaying single car posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package CarDealer
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

get_header();


global $jws_option;

    
    
$layout = (isset($jws_option['cars-detail-layout'])) ? $jws_option['cars-detail-layout'] : 'layout1';

if(isset($_GET['car_layout']) && $_GET['car_layout'] == 'layout2') {
     $layout =  'layout2';
}
$class = ' '.$layout;

?>
<div id="primary" class="content-area">
	<main id="main" class="site-main single-inventory<?php echo esc_attr( $class ); ?>">
        		<?php
        		while ( have_posts() ) :
        			the_post();
        			?>
        			<?php get_template_part( 'template-parts/content/cars/content', 'single-cars' ); ?>
        		<?php endwhile; // end of the loop. ?>
	</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();
