Skip to:
Content
Pages
Categories
Search
Top
Bottom

howto show topic-tags only for one forum?

  • @wdfee

    Participant

    Hello,

    thanks for developing bbPress. The 2.3 is looking and acting really good 🙂

    Can you help me: How can I show the tag cloud for a specific single forum only?
    I tried in my template file:

    wp_tag_cloud( array( 'smallest' => 9, 'largest' => 38, 'number' => 80, 'taxonomy' => bbp_get_topic_tag_tax_id() ) );

    Maybe with ‘child_of’? (but what would go here?)

    Thanks in advance!

    Fee

Viewing 1 replies (of 1 total)
  • @wdfee

    Participant

    I did it like this now:

    if( bbp_has_topics('nopaging=true') ):
    $terms = array();
    while ( bbp_topics() ) : bbp_the_topic();
    $obj_terms = wp_get_object_terms( bbp_get_topic_id(), bbp_get_topic_tag_tax_id(), array( 'fields' => 'ids' ) );
    $terms = array_merge($terms,$obj_terms);
    endwhile;
    $tags_array = array_unique($terms);
    $tags = implode(",", $tags_array);
    wp_tag_cloud( array( 'smallest' => 8, 'largest' => 20, 'number' => 80, 'taxonomy' => bbp_get_topic_tag_tax_id(), 'include' => $tags ) );
    endif;
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar