Filtering Posts

Posted in: Newspaper
Post count: 92

Hi there:

I run a site with seasonal content (i.e., content refreshes every 3-6 months, as opposed to daily or even weekly).

In the Filter Settings, they have a Sort Order > Random Posts (Last 7 Days)

Is there any way I can manually change that in the theme files to make it Random Posts (Last *90* Days), or last 180 Days?

Thanks much for any help!

http://ea1.a87.myftpupload.com/

Post count: 22421

Hello,
Adding a new sorting option will require coding knowledge though. Here is an example of a newly created sorting option in our theme so you can get an idea of what it involves: https://forum.tagdiv.com/topic/implemented-new-sort-most-popular-among-posts-of-last-7-days/
I hope this helps.
Thank you!

Post count: 92

Any quicker fixes? I don’t need to add a sorting option now; just change the “Random Posts (Last 7 Days)” parameter to Last 90 Days.

Is there a 7 I can change to 90 somewhere?

Post count: 92

Bump, in case it’s missed

Post count: 22421

Hello,

On our forum, the bump has the opposite effect. We answer from oldest to newest so a bump will only make the post newer and delay your answer 🙂 We do not miss topics as we have a system implemented that shows us which topic is unanswered by us so it’s pretty hard to miss a topic.
As for the request at hand, we have not tested this as it will take a bit of time to do so, theoretically the 7 days count is added like so: http://screencast.com/t/Z6pW8j6TPh4 it should change the number of days but we have not tested this as it will take a bit of time to monitor this counter, you can try it out and see the result.

I hope this helps
Thank you!

Post count: 22421

P.S. These values could also need changing: http://screencast.com/t/sSAC0wLOEj

Post count: 92

Thanks!

[Clicking “Notify me of follow-up replies via email” on this thread. : ) ]

Post count: 58

did you ever figure this one out? i have tried modifiying the above mentioned files, and my query finds no posts… any idea if this is for modofied or published dates?

Post count: 2

Hi,
open file Newspaper/includes/wp_booster/td_data_source.php
To change the Popular (last 7 days) option edit line ~135 (as Bogdan already said -> http://www.screencast.com/t/Z6pW8j6TPh4)
To change the Random posts from 7 days edit line ~169 (I set it to random posts from a month)

case 'random_7_day':
$wp_query_args['orderby'] = 'rand';
$wp_query_args['date_query'] = array(
'column' => 'post_date_gmt',
'after' => '1 month ago'
);
break;

Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.