<?php $options = _WSH()->option();
get_header();
$settings  = tycheproperty_set(tycheproperty_set(get_post_meta(get_the_ID(), 'bunch_page_meta', true) , 'bunch_page_options') , 0);
$meta = _WSH()->get_meta('_bunch_layout_settings');
$meta1 = _WSH()->get_meta('_bunch_header_settings');
$meta2 = _WSH()->get_meta();
_WSH()->page_settings = $meta;
if(tycheproperty_set($_GET, 'layout_style')) $layout = tycheproperty_set($_GET, 'layout_style'); else
$layout = tycheproperty_set( $meta, 'layout', 'right' );
if( !$layout || $layout == 'full' || tycheproperty_set($_GET, 'layout_style')=='full' ) $sidebar = ''; else
$sidebar = tycheproperty_set( $meta, 'sidebar', 'blog-sidebar' );
$classes = ( !$layout || $layout == 'full' || tycheproperty_set($_GET, 'layout_style')=='full' ) ? ' col-lg-12 col-md-12 col-sm-12 col-xs-12 ' : ' col-lg-9 col-md-8 col-sm-12 col-xs-12 ' ;
/** Update the post views counter */
_WSH()->post_views( true );
$title = tycheproperty_set($meta1, 'page_title');
$bg = tycheproperty_set($meta1, 'page_bg');
?>
<!--Page Title-->
<section class="page-title" <?php if($bg):?>style="background-image:url('<?php echo esc_url($bg);?>');"<?php endif;?>>
    <div class="auto-container">
        <div class="row clearfix">
            <!--Title -->
            <div class="title-column col-md-7 col-sm-6 col-xs-12">
                <h1><?php if($title) echo balanceTags($title); else wp_title('');?></h1>
            </div>
            <!--Bread Crumb -->
            <div class="breadcrumb-column col-md-5 col-sm-6 col-xs-12">
                <?php echo balanceTags(tycheproperty_get_the_breadcrumb());?>
            </div>
        </div>
    </div>
</section>

<?php while( have_posts() ): the_post(); 
	$post_meta = _WSH()->get_meta();
?>
	<!--Gallery Single-->
    <div class="gallery-single-container">
    	<div class="auto-container">
        	
            <!--Upper Part-->
            <div class="upper-part">
            	<div class="row clearfix">
                	<!--Image Column-->
                    <div class="column image-column col-md-8 col-sm-12 col-xs-12">
                    	<figure class="image-box"><?php the_post_thumbnail('771x500');?></figure>
                    </div>
                    <!--Specs Column-->
                    <div class="column specs-column col-md-4 col-sm-6 col-xs-12">
                    	<div class="inner-box wow fadeInRight" data-wow-duration="1500ms" data-wow-delay="0ms">
                        	<div class="content">
                            	<!--Info Block-->
                                <div class="info-block">
                                	<div class="icon-box"><span class="flaticon-building"></span></div>
                                    <h3><?php esc_html_e('Property Build In', 'tycheproperty');?></h3>
                                    <div class="text"><?php echo balanceTags(tycheproperty_set($meta2, 'year'));?></div>
                                </div>
                                <!--Info Block-->
                                <div class="info-block">
                                	<div class="icon-box"><span class="flaticon-bed"></span></div>
                                    <h3><?php esc_html_e('Number Of Rooms', 'tycheproperty');?></h3>
                                    <div class="text"><?php echo balanceTags(tycheproperty_set($meta2, 'rooms'));?></div>
                                </div>
                                <!--Info Block-->
                                <div class="info-block">
                                	<div class="icon-box"><span class="flaticon-house-plan-scale"></span></div>
                                    <h3><?php esc_html_e('Property Details', 'tycheproperty');?></h3>
                                    <div class="text"><?php echo balanceTags(tycheproperty_set($meta2, 'property'));?></div>
                                </div>
                                <!--Info Block-->
                                <div class="info-block">
                                	<div class="icon-box"><span class="flaticon-location-2"></span></div>
                                    <h3><?php esc_html_e('Location', 'tycheproperty');?></h3>
                                    <div class="text"><?php echo balanceTags(tycheproperty_set($meta2, 'location'));?></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                </div>
            </div>
            
            <!--Text Content-->
            <div class="text-content">
            	<h2><strong><?php esc_html_e('Project', 'tycheproperty');?></strong><?php esc_html_e('Description', 'tycheproperty');?> </h2>
                <div class="text">
                	<?php the_content();?>
                </div>
            </div>
            
            <!--Post Controls-->
            <div class="controls clearfix">
            	<div class="pull-left">
                	<a href="#" class="prev-btn control-btn">
                    	<span class="icon"><span class="fa fa-angle-left"></span></span>
                    	<?php esc_html_e('Previous Project', 'tycheproperty');?>
						<span class="post-title"><?php esc_html_e('Modern Interior House', 'tycheproperty');?></span>
                    </a>
                </div>
                <div class="pull-right">
                	<a href="#" class="next-btn control-btn">
                    	<span class="icon"><span class="fa fa-angle-right"></span></span>
                    	<?php esc_html_e('Next Project', 'tycheproperty');?>
						<span class="post-title"><?php esc_html_e('Modern Interior House', 'tycheproperty');?></span>
                    </a>
                </div>
            </div>
            
            <!--Recommended Posts-->
            <section class="recommended-posts">
            	<h2><strong><?php esc_html_e('Recommended', 'tycheproperty');?></strong><?php esc_html_e('Posts', 'tycheproperty');?> </h2>
            	<div class="row clearfix">
                	<?php if($gal_features = tycheproperty_set($meta2, 'gallery_img')):?>
                    <!--Post-->
                    <?php foreach($gal_features as $key => $value):?>
                    <div class="post default-portfolio-item col-md-4 col-sm-6 col-xs-12">
                        <div class="inner-box wow fadeInLeft" data-wow-duration="1500ms" data-wow-delay="0ms">
                            <figure class="image-box"><img src="<?php echo esc_url(tycheproperty_set($value, 'img'));?>" alt=""></figure>
                            <!--Overlay Box-->
                            <div class="overlay-box">
                                <div class="overlay-inner">
                                    <div class="content">
                                        <h3><a href="#gallery-popup" class=" has-gallery-popup" title=""><?php echo balanceTags(tycheproperty_set($value, 'img_title'));?></a></h3>
                                    </div>
                                </div>
                            </div>
                            <!--Gallery Popup Button-->
                    		<a href="#gallery-popup" class="image-link has-gallery-popup" title=""><span class="icon fa fa-compress"></span></a>
                        </div>
                    </div>
                    <?php endforeach;?>
                    <?php endif;?>
                </div>
            </section>
            
        </div>
    </div>
<?php endwhile;?>
<?php get_footer(); ?>