Notifications
Clear all

[Closed] Show number of subforum topics and main forum together

7 Posts
3 Users
0 Likes
395 Views
Posts: 1131
Topic starter
(@percysgrowroom)
Noble Member
Joined: 5 years ago

Hi guys, I hope you know what i mean here..... but where it says "Topics" on the front page of the forum, it refers to the amount of topics just in that one forums section. How can I change that number to show not only how many topics are in that forum section, but all of the sub forums too? 

6 Replies
Posts: 1131
Topic starter
(@percysgrowroom)
Noble Member
Joined: 5 years ago

Any idea? 

BlackRaz
Posts: 405
Admin
(@blackraz)
Contributor
Joined: 7 years ago

Hi @percysgrowroom ,

I will provide that information to our developers' team for consideration.

1 Reply
(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1131

@blackraz Thanks, @tutrix, do you know how to do this mate?

Tutrix
Posts: 1189
(@tutrix)
Noble Member
Joined: 4 years ago

Posted by: @percysgrowroom

@tutrix, do you know how to do this mate?

I don't have any subforums, so I can't test it.
But I use these 3 codes to show all topics and posts in a category.

<?php $counts = wpforo_forum($cat['forumid'], 'counts'); ?>
<?php echo wpforo_print_number($counts['topics']) ?>
<?php echo wpforo_print_number($counts['posts']) ?>

Inserted in the forum.php (layout) like this

<div class="wpf-cat-count"><?php $counts = wpforo_forum($cat['forumid'], 'counts'); ?><span class="wpf-topic-count" wpf-tooltip="<?php echo wpforo_print_number($counts['topics']) ?> Themen in '<?php echo esc_html($cat['title']); ?>'" wpf-tooltip-position="top" wpf-tooltip-size="medium"><i class="fas fa-layer-group"></i><?php echo wpforo_print_number($counts['topics']) ?></span> <span class="wpf-post-count" wpf-tooltip="<?php echo wpforo_print_number($counts['posts']) ?> Beitr&auml;ge in '<?php echo esc_html($cat['title']); ?>'" wpf-tooltip-position="top" wpf-tooltip-size="medium"><i class="fas fa-list"></i><?php echo wpforo_print_number($counts['posts']) ?></span></div>

 

2 Replies
(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1131

@tutrix Thanks mate ill give it a shot later and see how it goes : )

 

(@percysgrowroom)
Joined: 5 years ago

Noble Member
Posts: 1131

@tutrix This seems difficult man and im scared to try it lol.