I was wondering if there is a way to limit wp_query´s result by the creation date? I only want to get all post not older than three days.
You can use WP_Query's date parameters to accomplish this.
http://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters
$args = array(
'date_query' => array(
array(
'after' => $threeDaysAgo,
'inclusive' => true,
),
),
'posts_per_page' => -1,
);
$query = new WP_Query( $args );
After can take strtotime() compatible strings. http://php.net/manual/en/function.strtotime.php