<?php $bauen_options = get_option('bauen'); ?>

	<!-- Post -->
	<section class="pb-90">
		<div class="container">
			<div class="row">
				<div class="col-md-12"> 
					<?php if(get_post_meta($post->ID,'bauen_blog_post_header_bg_img_opt',true)!='no'){ ?>
						<?php if (has_post_thumbnail( $post->ID ) ):
						$bauen_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), '' );?>
						<?php $bauen_image_id = get_post($id); $bauen_image_title = $bauen_image_id->post_title; ?>
						<?php if( function_exists( 'rwmb_meta' ) ) { ?> 
						<?php $bauen_back_image = rwmb_meta( 'bauen_blog_post_header_bg_img','type=image&size=' ); ?>
						<?php } ;?>		
						<?php if ( ! empty( $bauen_back_image ) ) { ?>
						<?php foreach ( $bauen_back_image as $bauen_back_images ){ ?>	
						<img src="<?php echo esc_url(($bauen_back_images['url']));?>" class="mb-30" alt="<?php echo esc_attr($bauen_image_title);?>" />  						
						<?php } ;?>																				
						<?php } 
						else { ?>
						<img src="<?php echo esc_url($bauen_image[0]);?>" class="mb-30" alt="<?php echo esc_attr($bauen_image_title);?>" />  
						<?php } ;?>
						<?php endif; ?>
					<?php } ?>	
					<?php if(get_post_meta($post->ID,'bauen_blog_post_header_title_opt',true)!='no'){ ?>
						<?php if(get_post_meta($post->ID,'bauen_blog_post_header_title_tag',true)=='st1'){ ?>
							<h1 class="section-title2"><?php if (( get_post_meta($post->ID,'bauen_blog_post_header_title',true))):?><?php echo esc_html(get_post_meta($post->ID,'bauen_blog_post_header_title',true)); ?><?php else : ?><?php the_title();?><?php endif;?></h1>
						<?php } 
						else if(get_post_meta($post->ID,'bauen_blog_post_header_title_tag',true)=='st3'){ ?> 
							<h3 class="section-title2"><?php if (( get_post_meta($post->ID,'bauen_blog_post_header_title',true))):?><?php echo esc_html(get_post_meta($post->ID,'bauen_blog_post_header_title',true)); ?><?php else : ?><?php the_title();?><?php endif;?></h3>
						<?php } 
						else if(get_post_meta($post->ID,'bauen_blog_post_header_title_tag',true)=='st4'){ ?> 
							<h4 class="section-title2"><?php if (( get_post_meta($post->ID,'bauen_blog_post_header_title',true))):?><?php echo esc_html(get_post_meta($post->ID,'bauen_blog_post_header_title',true)); ?><?php else : ?><?php the_title();?><?php endif;?></h4>
						<?php } 
						else if(get_post_meta($post->ID,'bauen_blog_post_header_title_tag',true)=='st5'){ ?> 
							<h5 class="section-title2"><?php if (( get_post_meta($post->ID,'bauen_blog_post_header_title',true))):?><?php echo esc_html(get_post_meta($post->ID,'bauen_blog_post_header_title',true)); ?><?php else : ?><?php the_title();?><?php endif;?></h5>
						<?php } 
						else if(get_post_meta($post->ID,'bauen_blog_post_header_title_tag',true)=='st6'){ ?> 
							<h6  class="section-title2"><?php if (( get_post_meta($post->ID,'bauen_blog_post_header_title',true))):?><?php echo esc_html(get_post_meta($post->ID,'bauen_blog_post_header_title',true)); ?><?php else : ?><?php the_title();?><?php endif;?></h6>	
						<?php } 
						else { ?>
							<h2 class="section-title2"><?php if (( get_post_meta($post->ID,'bauen_blog_post_header_title',true))):?><?php echo esc_html(get_post_meta($post->ID,'bauen_blog_post_header_title',true)); ?><?php else : ?><?php the_title();?><?php endif;?></h2>
						<?php } ?>						
					<?php } ?>						
					<div class="post-content"> 
					<?php the_content();
						wp_link_pages( array(
						'before'      => '<div class="page-links">',
						'after'       => '</div>',
						'link_before' => '<span>',
						'link_after'  => '</span>',
						'pagelink'    => '%',
						'separator'   => '',
						) );
					?>	
					</div>

				</div>
			</div>
			<?php if ( comments_open() || get_comments_number() ) { ?>	
			<div class="bauen-comment-section">	
                <div class="row">			
				    <?php comments_template();?>								
			    </div>
			</div>
			<?php }?>				

		</div>
	</section>	  