Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Closed] Forum Stats Missing Information

14 Posts
3 Users
0 Reactions
3,566 Views
Sofy
Posts: 5486
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 years ago

Hi Dan Lee,

Please navigate to Dashboard > Forums > Dashboard, click on "Update Forums Statistic", then delete all caches, do CTRL + f5 on frontend. If it doesn't help let us know. 

 

Posts: 67
Topic starter
(@dmlphotography)
Trusted Member
Joined: 8 years ago

Still the same @sofy

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

This is a specific case. wpForo doesn't display last post info stat if that info comes from a forum which is private for regular visitors (guests). To make it available for registered users you should put this code in WordPress theme functions.php file.

function wpforo_fix_footer_stat_for_private_forum( $stats ) {
if(function_exists('WPF')){
$posts = WPF()->topic->get_topics(array('orderby' => 'modified', 'order' => 'DESC', 'row_count' => 1, 'private' => 0, 'status' => 0 ));
$key = key($posts);
if ( wpfval($posts, $key) ) {
$stats['last_post_title'] = $posts[$key]['title'];
$stats['last_post_url'] = WPF()->post->get_post_url($posts[$key]['last_post']);
}
}
return $stats;
}
add_filter( 'wpforo_get_statistic_array_filter', 'wpforo_fix_footer_stat_for_private_forum');

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

IMPORTANT: Once you put this code, please navigate to Dashboard > Forum Dashboard admin page and click on [Delete all caches] and [Update Forum Statistic] buttons.

Posts: 67
Topic starter
(@dmlphotography)
Trusted Member
Joined: 8 years ago

This worked, thanks. 

Page 3 / 3