"popular (all time)" > "popular (last month)"

Posted in: Newspaper
Post count: 200

Hey

have anyone figured out how to change filter “popular (all time)” to “popular (last month)” or “popular (last 90 days)”, so it will show only last 30 days or last 90 days instead of all time and will stay that way after next Newspaper update. You know, “all time” is kind of useless sorting option. 😉

Post count: 35449

Hi,

You can make that change in theme file, but unfortunately this change will be need to be made again to the next update of theme.
In order to do that you need to go in wp-content/themes/Newspaper/includes/wp_booster/td_data_source.php
-> https://www.screencast.com/t/XkGJuquY
You can edit the popular7 , just replace in code the “604800” seconds for seven days with the “2592000” for 30 days.
In order to change the text from drop-down chooser you need to edit the wp-content/themes/Newspaper/includes/td_config.php
-> https://www.screencast.com/t/XooqKeVIZko

Hope this will help you!
Thanks.

Post count: 200

With “popular 7 days” is the problem that it does not work with cache or CDNs.

  • This reply was modified 7 years by Edragon.
Post count: 200

I think I will go this time with WordPress Popular Posts plugin instead of changing the code every time. But hopefully, you guys will add sooner or later option where newspaper users can choose popular posts time. That way you need fewer plugins.

Post count: 35449

Hi,

This is a good suggestion, I will note on our feature list of suggestions.

Thank you.

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