For a custom widget I want to retrieve the last posts published in the last hour.
All I can do actually is to display the posts of the day, with this query :
$queryArgs = array(
'category_name' => 'myCategory',
'posts_per_page'=> $number,
'date_query' => array(
array(
'year' => date( 'Y' ),
'month' => date( 'm' ),
'day' => date( 'd' )
),
),
);
$query = new WP_Query($queryArgs);