Notifications
Clear all
Topic starter
2024-01-01 20:23
在wpForo中,您可以使用wpforo_recent_posts_limit 过滤器钩子来更改显示最近帖子的时间段。例如,您可以显示过去365天内最近发布的帖子:
add_filter( 'wpforo_recent_posts_limit', 'wpforo_custom_recent_posts_limit' );
function wpforo_custom_recent_posts_limit( $limit ) {
return 365;
}
您可以将365更改为您想要的任何值。
您可以在当前活动 WordPress 主题的 functions.php 文件中添加此代码,或使用插件,该插件允许您添加自定义 PHP 代码片段,例如 Code Snippets.


