I think bbPress just uses the code from WordPress since the topic tag clouds code is close to WordPress’s version for regular posts.
You can see the tag cloud on hover displays the number of topics.
https://bbpress.org/forums/
I tried searching what it was, but couldn’t really pinpoint the exact function.
Hi,
If it can help, check shortcodes. The 2nd one could be your starting point:
[bbp-topic-tags] – Display a tag cloud of all topic tags.
[bbp-single-tag id=$tag_id] – Display a list of all topics associated with a specific tag. eg. [bbp-single-tag id=64]
See https://codex.bbpress.org/features/shortcodes/
Pascal.
With a combination of two methods, I was able to get the number of topics per tag. These methods query the taxonomies of bbPress’ topic-tag:
$tagList = get_the_terms($post->ID, bbp_get_topic_tag_tax_id());
The output of $tagList is as follow and ‘count’ is what i’m interested in:
{
term_id: 24
name: “Presidential”
slug: “presidential”
term_group: 0
term_taxonomy_id: 24
taxonomy: “topic-tag”
description: “”
parent: 0
count: 3
object_id: 155
filter: “raw”
}
Hope this helps others.
Hi,
This topic is quite old but it seems to be the only one about displaying tagged topics count. How would you implement the query to count topic tags? Is it possible to create a custom shortcode to show the tag count? Any help with this would be greatly appreciated, thanks!