Notifications
Clear all

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

7 Posts
3 Users
0 Reactions
747 Views
Posts: 1212
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 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: 1212
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 years ago

Any idea? 

BlackRaz
Posts: 404
Admin
(@blackraz)
Contributor
Joined: 8 years ago

Hi @percysgrowroom ,

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

1 Reply
(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

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

Tutrix
Posts: 1504
(@tutrix)
Noble Member
Joined: 5 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: 6 years ago

Noble Member
Posts: 1212

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

 

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

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