Hello !
You can edit the widgets features using the tagDiv Composer. There you can limit your widget to display your most popular posts from the last 7 days like here: https://www.screencast.com/t/t2LnfUMF94. https://www.screencast.com/t/MWlWtFRbRDFr. Or you can display random posts from your last 7 days.
Thank you !
For anyone else looking for the same function, and I have seen quite a few people ask for this, here is how I solved it.
It is a workaround, and if someone can offer an improvement on this solution, please paste your code below.
Copy td_data_source.php from the parent theme and paste to:
/wp-content/themes/Newspaper-child/includes/wp_booster/td_data_source.php
I decided I am probably never going to use the Sort Alphabetically option for my td composer widgets. So, I updated the args array for Sort Alphabetical to suit my purposes.
Comment out the normal alphabetical order and use the new code below.
// case ‘alphabetical_order’:
// $wp_query_args[‘orderby’] = ‘title’;
// $wp_query_args[‘order’] = ‘ASC’;
// break;
case ‘alphabetical_order’: //Limit to last 10 days
$wp_query_args[‘date_query’] = array(
‘after’ => date(‘Y-m-d’, strtotime(‘-10 days’))
);
break;
@ the theme developers: Please can this can go on the wishlist and be included in a future version.
The amount of days should be a selectable field in the widget option.
