Notifications
Clear all

wpForo 1.x.x [Closed] recent posts

8 Posts
3 Users
3 Reactions
1,209 Views
Posts: 47
Topic starter
(@adriaan)
Trusted Member
Joined: 4 years ago

Hi there,

Is it possible to set the recent posts so that posts that are older than 3 months are not displayed?

best regards

7 Replies
Tutrix
Posts: 1493
(@tutrix)
Noble Member
Joined: 5 years ago

@adriaan

read this post > Change Recent Topics Time Limit

Posts: 47
Topic starter
(@adriaan)
Trusted Member
Joined: 4 years ago

Hey,

Thank you.
I added this code to my snippet plugin:

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

but i cant see changes. should i clear the forum cache?

1 Reply
Tutrix
(@tutrix)
Joined: 5 years ago

Noble Member
Posts: 1493

@adriaan 

yes, after each change on files/templates, you need to clear the cache

Posts: 47
Topic starter
(@adriaan)
Trusted Member
Joined: 4 years ago

Hey

I did that but unfortunately there is no change

or does it have to be in the functions.php of the theme? I have now put that into a plugin for code snippets

1 Reply
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3627

@adriaan,

Yes, it must be in your Active themes functions.php file.

Posts: 47
Topic starter
(@adriaan)
Trusted Member
Joined: 4 years ago

Hey

 

I copied it into the theme's functions.php and cleared the forum's cache, but that didn't change anything

1 Reply
Tutrix
(@tutrix)
Joined: 5 years ago

Noble Member
Posts: 1493

@adriaan 

try a lower value instead of 30