Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 420)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 425)
@@ -6,11 +6,13 @@
 	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
 	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] );
-	$disp_count =  ($options[2])?intval($options[2]):10;
-	$excerpt = empty( $options[3] ) ? false : true ;
-	$excerpt_size =  ($options[4])?intval($options[4]):100;
-	$date_format = empty( $options[5] ) ? '' : $options[5] ;
-	$time_format = empty( $options[6] ) ? '' : $options[6] ;
-	$tag_select = $options[7] ;
-    $selected = array_slice($options,8); // get allowed cats
+	$day_select = ($options[2])?intval($options[2]):0;
+	$day_size = ($options[3])?intval($options[3]):0;
+	$disp_count =  ($options[4])?intval($options[4]):10;
+	$excerpt = empty( $options[5] ) ? false : true ;
+	$excerpt_size =  ($options[6])?intval($options[6]):100;
+	$date_format = empty( $options[7] ) ? '' : $options[7] ;
+	$time_format = empty( $options[8] ) ? '' : $options[8] ;
+	$tag_select = $options[9] ;
+    $selected = array_slice($options,10); // get allowed cats
 
 	$mydirpath = get_xpress_dir_path();
@@ -26,4 +28,8 @@
 		$author_where = '';
 	}
+	
+	$date_today = mktime (0, 0, 0, date("m"), date("d"), date("Y"));
+	$between_days = $day_size * 60 * 60 * 24;
+	
 	global $wpdb,$wp_query;
 	$block = array();
@@ -33,11 +39,22 @@
 		if (array_search(0,$selected)===0) {
 			$r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
-
 		} else {
 			$cat_id = implode(',',$selected);
-			$r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+			$r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
 		}
 		while($r->have_posts()){			
 			$r->the_post();
+			if ($day_select == 1){
+				$post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y"));
+				$base_date = $date_today - $between_days;
+				if ($post_date < $base_date) continue;
+			}
+			if ($day_select == 2){
+				$post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y"));
+				if (empty($lastes_date)) $lastes_date = $post_date;
+				$base_date = $lastes_date - $between_days;
+				if ($post_date < $base_date) continue;
+			}
+			
 			ob_start();
 				the_ID();
