Skip to:
Content
Pages
Categories
Search
Top
Bottom

display labels based on topic status?

Viewing 2 replies - 1 through 2 (of 2 total)

  • Robkk
    Participant

    @robkk

    solved my own problem

    found this

    http://bavotasan.com/2014/add-resolved-to-closed-topics-in-bbpress/

    instead of using function.php

    i threw this into loop-single-topic ,
    the way i have my topics arranged it shows below the title

    for closed label

    <?php
       $topic_id = bbp_get_topic_id();
       if ( get_post_type( $topic_id ) == bbp_get_topic_post_type() && bbp_is_topic_closed( $topic_id ) )
          echo '<span class="closed">[CLOSED]</span>';
    ?>

    for sticky label

    <?php
       $topic_id = bbp_get_topic_id();
       if ( get_post_type( $topic_id ) == bbp_get_topic_post_type() && bbp_is_topic_sticky( $topic_id ) )
          echo '<span class="sticky">[STICKY]</span>';
    ?>

    Robin W
    Moderator

    @robin-w

    great – glad you’re fixed !

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.