Hi:
A suggestion: I was wondering if more sorting options could be included when configuring blocks, like:
1.- Random posts from last 7 days
2.- Random posts from today
For daily publications, it’s always nice to show readers fresh content when they visit the frontpage, so random posts from today would be a hit instead of just random posts that show old articles.
Thanks!
hi,
http://screencast.com/t/ALCpG7Jc4WR
this is the default: show latest.
Thanks for you message.
Radu A.
Hi:
Yes, but that option only lists the most recent items. I was suggesting a new sorting option for blocks: random posts from last 24 hours or random posts from last 7 days, etc. In order to show fresh content, recent content but in a random way, but avoiding old posts from showing randomly on the frontpage.
Thanks!
Hi,
Add this code:
'Random posts Today' => 'random_today' , 'Random posts from last 7 Day' => 'random_7_day' , like here: http://screencast.com/t/3cSVV4I9wc
Add this code:
case 'random_today':
$wp_query_args['orderby'] = 'rand';
$wp_query_args['day'] = date('j');
break;
case 'random_7_day':
$wp_query_args['orderby'] = 'rand';
$wp_query_args['date_query'] = array(
'column' => 'post_date_gmt',
'after' => '1 week ago'
);
break;
like here: http://screencast.com/t/wFedEyPxcX58
Thanks!
