<?php get_header(); ?>

<div id="wrapper" class="clearfix">
         	<div id="content" class="clearfix" >
            	
                
                 <?php if ( get_option( 'ptthemes_breadcrumbs' )) {  ?>
                <div class="breadcrumb clearfix">
                	<div class="breadcrumb_in"><?php yoast_breadcrumb('','');  ?></div>
                </div>
            <?php } ?>
              <?php if (is_paged()) $is_paged = true; ?>
            	 <?php if (is_search()) { ?>
                   <?php if($_REQUEST['s']=='Calender-Event'){
					   global $wpdb,$wp_query;
						$m = $wp_query->query_vars['m'];
						$py = substr($m,0,4);
						$pm = substr($m,4,2);
						$pd = substr($m,6,2);
						$the_req_date = "$py-$pm-$pd";
					   ?>
                   <h1><?php echo date('F jS, Y',strtotime($the_req_date)); ?></h1>
                   <?php }else{?>
                    <h1 class="cat_head" ><?php _e('Search Result');?></h1>
                    <?php }?>
                    <?php } ?>
                    
               
 
 <ul class="category_list_view">


			<?php if(have_posts()) : ?>
 			<?php while(have_posts()) : the_post() ?>
		  <?php $post_images = bdw_get_images($post->ID,'large');?>
           <?php get_the_post_content('listing_li')?>
          <?php endwhile; ?>
      
      </ul>
      
      
      <div class="pagination">
        <?php if (function_exists('wp_pagenavi')) { ?>
        <?php wp_pagenavi(); ?>
        <?php } ?>
      </div>
      <?php else: ?>
      <p class="notice_msg"><?php _e( 'Sorry, but nothing matched your search criteria. <br /> Please try again with some different criteria.'); ?></p>
      <?php endif; ?>
			 
      </div> <!-- content #end -->
        
        
		
         
         
         <div id="sidebar">
	<?php dynamic_sidebar(5);  ?>
</div> <!-- sidebar right--> 

</div> <!-- wrapper #end -->
<div id="bottom"></div>		
<?php get_footer(); ?>
