How to increase tim...
 
Notifications
Clear all

[Closed] How to increase time period of recent posts

4 Posts
4 Users
1 Likes
561 Views
Robert
(@robert)
Support Team Admin
Joined: 7 years ago
Posts: 10154
Topic starter  

In wpForo, you can use the wpforo_recent_posts_limit filter hook to change the time period of displaying recent posts. For example, you can display recent posts made during the last 365 days:

add_filter( 'wpforo_recent_posts_limit', 'wpforo_custom_recent_posts_limit' );
function wpforo_custom_recent_posts_limit( $limit ) {
    return 365;
}

You can change the 365 to any value you want.
You can add this code in functions.php file of your current active WordPress theme or use a plugin which allow you to add custom PHP code snippets like Code Snippets.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.


   
dimalifragis
(@dimalifragis)
Famed Member
Joined: 3 years ago
Posts: 2287
 

Hi,

This doesn't seem to work for me.


   
(@tutrix)
Noble Member
Joined: 3 years ago
Posts: 1081
 

does this also work in the Recent Posts widget or is this just a way without changing this code directly?

$days = apply_filters( 'wpforo_recent_posts_limit', 30 );

visit my wpForo > Tutrix.de (unofficial german wpForo Support)
with lots of customization & modification, e.g. hover cards, topic/post preview on mouseover, chatbox and much more...


   
(@chris)
Support Team Admin
Joined: 2 years ago
Posts: 3653
 

@tutrix, @dimalifragis

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.


   
dimalifragis reacted