<?php $bauen_options = get_option('bauen'); ?>
		<!-- Blog  -->
		<section class="bauen-blog2 section-padding2">
			<div class="container">

				<?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();?>
				    
					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<div class="row mb-60">                    
					    <?php if(get_post_meta($post->ID,'bauen_post_img_float_opt',true)=='st2'){ ?>
						
							<div class="col-md-6 order2 valign animate-box" data-animate-effect="fadeInLeft">
								<div class="content">
									<div class="date">
										<h3><?php the_time( 'j' ); ?></h3>
										<h6><?php the_time( 'M Y' ); ?></h6> 
									</div>
									<div class="cont">
										<div class="info">
											<h6><?php the_category(', ');?>
											<?php if( has_tag() ) {?>
											<?php esc_html_e(' / ','bauen');?> 
										    <span class="tags"> <?php the_tags( ' ', ', ', ' ' ); ?></span>
										   <?php } ?></h6> 
										</div>
										<?php $bauen_post_title= get_the_title(); ?>
										<h4><a href="<?php the_permalink();?>">
											<?php if($bauen_post_title != '') { ?>
												<?php the_title();?>
											<?php } else { ?>	
												<?php the_time( get_option( 'date_format' ) ); ?>
											<?php } ?>											
										</a></h4> 
										<a href="<?php the_permalink();?>" class="more" data-splitting=""><span>
											<?php if(!empty($Bauen_AfterSetupTheme['blog_read_more'])): ?>
												<?php echo esc_html(Bauen_AfterSetupTheme::return_thme_option('blog_read_more',''));?> 
											<?php else:?>	
												<?php esc_html_e('Read More','bauen');?>
											<?php endif; ?>	
										</span></a>									
									</div>
								</div>
							</div>	
							<?php if (has_post_thumbnail( $post->ID ) ):?> 
							<?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; ?>
							<div class="col-md-6 animate-box" data-animate-effect="fadeInRight">						
								<div class="img">
									<a href="<?php the_permalink();?>"><img src="<?php echo esc_url($bauen_image[0]);?>" alt="<?php echo esc_attr($bauen_image_title);?>" /></a>
								</div>
							</div>
							<?php endif;?>														
						
						<?php } 
						else { ?>	

							<?php if (has_post_thumbnail( $post->ID ) ):?> 
							<?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; ?>
							<div class="col-md-6 animate-box" data-animate-effect="fadeInLeft">						
								<div class="img left">
									<a href="<?php the_permalink();?>"><img src="<?php echo esc_url($bauen_image[0]);?>" alt="<?php echo esc_attr($bauen_image_title);?>" /></a>
								</div>
							</div>
							<?php endif;?>
							<div class="col-md-6 order1 valign animate-box" data-animate-effect="fadeInRight">
								<div class="content">
									<div class="date">
										<h3><?php the_time( 'j' ); ?></h3>
										<h6><?php the_time( 'M Y' ); ?></h6> 
									</div>
									<div class="cont">
										<div class="info">
											<h6><?php the_category(', ');?> 
											<?php if( has_tag() ) {?>
											<?php esc_html_e(' / ','bauen');?> 
										    <span class="tags"> <?php the_tags( ' ', ', ', ' ' ); ?></span>
										    <?php } ?></h6> 
										</div>
										<?php $bauen_post_title= get_the_title(); ?>
										<h4><a href="<?php the_permalink();?>">
											<?php if($bauen_post_title != '') { ?>
												<?php the_title();?>
											<?php } else { ?>	
												<?php the_time( get_option( 'date_format' ) ); ?>
											<?php } ?>											
										</a></h4> 
										<a href="<?php the_permalink();?>" class="more" data-splitting=""><span>
											<?php if(!empty($Bauen_AfterSetupTheme['blog_read_more'])): ?>
												<?php echo esc_html(Bauen_AfterSetupTheme::return_thme_option('blog_read_more',''));?> 
											<?php else:?>	
												<?php esc_html_e('Read More','bauen');?>
											<?php endif; ?>	
										</span></a>									
									</div>
								</div>
							</div>		
					
						<?php } ;?>
						

					</div>                   				
					</div>                   				
					<?php endwhile; ?>
					<?php wp_reset_postdata();?>

					<!-- pagination start -->
					<?php if (function_exists("bauen_pagination")) {
					bauen_pagination($bauen_loop->max_num_pages);
					} ?>
					<!-- pagination end -->										
			</div>
		</section>						