<?php $bauen_options = get_option('bauen'); ?>
		<!-- Blog  -->
		<section class="bauen-blog section-padding2">
			<div class="container">
				<div class="row">
					<?php
					global $post, $post_id, $bauen_post_title;
					$bauen_showpost= get_post_meta($post->ID, 'bauen_blog_post_show', true);
					$bauen_offset= get_post_meta($post->ID, 'bauen_blog_post_offset', true);
					$bauen_categoryname=get_post_meta($post->ID, 'bauen_blog_post_cat', true);
					$bauen_paged=(get_query_var('paged'))?get_query_var('paged'):1;
					$bauen_loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page'=>$bauen_showpost, 'category_name'=>$bauen_categoryname, 'offset' => $bauen_offset, 'paged'=>$bauen_paged ) ); ?>
					<?php while ( $bauen_loop->have_posts() ) : $bauen_loop->the_post();?>
                        <?php if (has_post_thumbnail( $post->ID ) ):?>
						<div class="col-md-6">								
							<div class="item">
							<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
								
								<?php $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; ?>
								<a href="<?php the_permalink();?>">
								    <div class="position-re o-hidden">
								        <img src="<?php echo esc_url($bauen_image[0]);?>" alt="<?php echo esc_attr($bauen_image_title);?>" />
								    </div>
								</a>								
								
								<div class="con">
								    <span class="category">
                                        <?php the_category(', ');?> <?php esc_html_e('-','bauen');?> <?php the_time( get_option( 'date_format' ) ); ?>
								    </span>
									<?php $bauen_post_title= get_the_title(); ?>
									<h5><a href="<?php the_permalink();?>">
										<?php if($bauen_post_title != '') { ?>
											<?php the_title();?>
										<?php } else { ?>	
											<?php the_time( get_option( 'date_format' ) ); ?>
										<?php } ?>											
									</a></h5> 
								</div>
							</div>
							</div>
						</div>
					<?php endif;?>	
					<?php endwhile; ?>
					<?php wp_reset_postdata();?>	
                </div> 
				<!-- pagination start -->
				<?php if (function_exists("bauen_pagination")) {
				bauen_pagination($bauen_loop->max_num_pages);
				} ?>
				<!-- pagination end -->	
			</div>
		</section>	
