我想显示最后3天的帖子随机。如何编辑此代码?
<?php
$randompost = array(
\'numberposts\' => 2,
\'type\' => \'news\',
\'orderby\' => \'rand\',
\'year\' => date( \'Y\' ),
\'week\' => date( \'W\' ),
);
$rand_posts = get_posts( $randompost );
foreach( $rand_posts as $post ) : ?>
<?php endforeach; ?>