<?php $options = _WSH()->option();
	get_header(); 
	$settings  = manufacto_set(manufacto_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;
	_WSH()->post_views( true );
	$bg = manufacto_set($meta1, 'header_img');
	$title = manufacto_set($meta1, 'header_title');
	$text = manufacto_set($meta1, 'header_text');
?>

<!--Page Title-->
<section class="page-title" <?php if($bg):?>style="background-image:url(<?php echo esc_url($bg)?>);"<?php endif;?>>
    <div class="auto-container">
        <h1><?php if($title) echo wp_kses_post($title); else wp_title('');?></h1>
        <div class="text"><?php if($text) echo wp_kses_post($text); else 'Graduate study in chemical engineering can lead to a career of research and teaching';?></div>
    </div>
    <!--Page Info-->
    <div class="page-info">
        <div class="auto-container clearfix">
            <div class="pull-right">
                <?php echo wp_kses_post(manufacto_get_the_breadcrumb()); ?>
            </div>
        </div>
    </div>
</section>
<!--End Page Title-->

<?php while( have_posts() ): the_post(); 
	$post_meta = _WSH()->get_meta('bunch_projects');
?> 

<!--Project Single Section-->
<section class="project-single-section">
    <div class="auto-container">
        <div class="inner-box">
            <div class="upper-box">
                <div class="single-item-carousel owl-carousel owl-theme">
                    <?php if($projects_img = manufacto_set($meta2, 'bunch_projects_image')): ?>
                    	<?php foreach($projects_img as $key => $value):?>
                            <div class="slide">
                                <div class="image">
                                    <img src="<?php echo esc_url(manufacto_set($value, 'projects_image'));?>" alt="" />
                                </div>
                            </div>
                    	<?php endforeach;?>
                    <?php endif;?>
                </div>
            </div>
            
            <div class="lower-content">
                <h2><?php the_title(); ?></h2>
                
                <?php the_content(); ?>
            </div>
            
            <div class="project-list">
                <div class="row clearfix">
                    <div class="column col-md-6 col-sm-6 col-xs-12">
                        <ul>
                            <li><span class="icon fa fa-universal-access"></span><strong><?php esc_html_e('Client :', 'manufacto'); ?></strong>    <?php echo wp_kses_post(manufacto_set($meta2, 'client_name')); ?></li>
                            <li><span class="icon fa fa-calendar"></span><strong><?php esc_html_e('Construction Date :', 'manufacto'); ?></strong>    <?php echo wp_kses_post(manufacto_set($meta2, 'project_date')); ?></li>
                            <li><span class="icon fa fa-globe"></span><strong><?php esc_html_e('Investors Website :', 'manufacto'); ?></strong>    <?php echo wp_kses_post(manufacto_set($meta2, 'website_link')); ?></li>
                        </ul>
                    </div>
                    <div class="column col-md-6 col-sm-6 col-xs-12">
                        <ul>
                            <li><span class="icon fa fa-map"></span><strong><?php esc_html_e('Location :', 'manufacto'); ?></strong>    <?php echo wp_kses_post(manufacto_set($meta2, 'location')); ?></li>
                            <li><span class="icon fa fa-dollar"></span><strong><?php esc_html_e('Value :', 'manufacto'); ?></strong>    <?php echo wp_kses_post(manufacto_set($meta2, 'project_price')); ?></li>
                            <li class="social-icons">
                                <span class="follow"><?php esc_html_e('Share:', 'manufacto'); ?></span>
                                
                                <?php if(manufacto_set($options, 'facebook_sharing')):?>
                                <a href="http://www.facebook.com/sharer.php?u=<?php echo esc_url(get_permalink(get_the_id())); ?>" target="_blank"><span class="fa fa-facebook-f"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'twitter_sharing')):?>
                                <a href="https://twitter.com/share?url=<?php echo esc_url(get_permalink(get_the_id())); ?>&text=<?php echo esc_attr($post_slug=$post->post_name); ?>" target="_blank"><span class="fa fa-twitter"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'google_plus_sharing')):?>
                                <a href="https://plus.google.com/share?url=<?php echo esc_url(get_permalink(get_the_id())); ?>" target="_blank"><span class="fa fa-google-plus"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'linkedin_sharing')):?>
                                <a href="http://www.linkedin.com/shareArticle?url=<?php echo esc_url(get_permalink(get_the_id())); ?>&title=<?php echo esc_attr($post_slug=$post->post_name); ?>"><span class="fa fa-linkedin"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'pinterest_sharing')):?>
                                <a href="https://pinterest.com/pin/create/bookmarklet/?url=<?php echo esc_url(get_permalink(get_the_id())); ?>&description=<?php echo esc_attr($post_slug=$post->post_name); ?>"><span class="fa fa-pinterest"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'reddit_sharing')):?>
                                <a href="http://reddit.com/submit?url=<?php echo esc_url(get_permalink(get_the_id())); ?>&title=<?php echo esc_attr($post_slug=$post->post_name); ?>"><span class="fa fa-reddit"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'tumblr_sharing')):?>
                                <a href="http://www.tumblr.com/share/link?url=<?php echo esc_url(get_permalink(get_the_id())); ?>&name=<?php echo esc_attr($post_slug=$post->post_name); ?>"><span class="fa fa-tumblr"></span></a>
                                <?php endif;?>
                                
                                <?php if(manufacto_set($options, 'digg_sharing')):?>
                                <a href="http://digg.com/submit?url=<?php echo esc_url(get_permalink(get_the_id())); ?>&title=<?php echo esc_attr($post_slug=$post->post_name); ?>"><span class="fa fa-digg"></span></a>
                                <?php endif;?>
                                
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <br><br>
        
        <!--Styled Pagination-->
        <div class="styled-pagination">
            <div class="inner-container clearfix">
                <div class="clearfix text-center">
                    <div class="col-md-4 col-sm-4 col-xs-4">
                        <div class="prev-post pull-left">
                            <?php previous_post_link('%link','<span class="fa fa-long-arrow-left"></span> Prev Post'); ?>
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4 col-xs-4">
                        <div class="icon-holder text-center">
                            <a href="javascript:;">
                                <i class="fa fa-th" aria-hidden="true"></i>
                            </a>
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4 col-xs-4">
                        <div class="next-post pull-right">
                        	<?php next_post_link('%link','Next Post <span class="fa fa-long-arrow-right"></span>'); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--End Projects Section-->

<?php endwhile;?>

<?php get_footer(); ?>