Notifications
Clear all

wpForo 1.x.x [Solved] Change Recent Topics Time Limit

3 Posts
3 Users
3 Reactions
2,133 Views
Posts: 10
Topic starter
(@xcalizorz)
Active Member
Joined: 6 years ago

Hi,

is it possible to change the time limit of the recent topics tab
/%wpforo-recent%/

Or show a list of all unanswered questions?

I can only see all posts within the last two weeks, but I need to see all unanswered topics since "the beginning".
Important is, that I need to use the Q&A-Layout and cannot switch to any other layout.
Could you please guide me here? 

2 Replies
Sofy
Posts: 4900
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi @xcalizorz,

You should customize the recent.php file in /wp-content/plugins/wpforo/wpf-themes/classic/ folder. Find this line, Change the 14 number as you like. There are two 14 numbers first is on line 15, the second is on line 57:

$end_date = time() - (14 * 24 * 60 * 60); 

Doc for Theme Customization here: https://wpforo.com/docs/root/forum-themes/theme-customization/

 

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

With the latest versions of wpForo you can use a simple filter hook to increase the time limit by days. Just put this code in your current active WordPress theme functions.php file and change the red marked 30 days to any time period you want:

add_filter('wpforo_recent_posts_limit', function($days){return 30;} );

 

How to Easily Add Custom Code in WordPress (without Breaking Your Site)