Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show status label for bbPress Topics with No Replies

  • @arutam

    Participant

    Hi Guys!

    I found the guide where are the codes for “Show status labels for bbPress Topics”… Well, I want to add a label for “Topics with No replies”, i tried do it by myself but It makes me crazy..

    Does anybody know which reference or functions should I use?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @casiepa

    Moderator

    @arutam

    Participant

    Thanks @Casiepa

    But I don’t want count the replies, I just wanna add a Label to Topics with 0 replies, and hide it if somebody reply the topic.

    I found the info here:

    24. Show status labels for bbPress Topics

    Any other suggestion?

    I think the label (no replies) should be on the documentation by default.

    @robkk

    Moderator

    @arutam to make the function work, counting the replies is exactly what you need to do.

    Try this amd see if it works.

    function rkk_empty_topics() {
        $topic_reply_count =  bbp_get_topic_reply_count();
        if ( $topic_reply_count == 0 )
            echo '<span class="empty">[No Replies]</span>';
    }
    add_action( 'bbp_theme_before_topic_title', 'rkk_empty_topics' );

    @arutam

    Participant

    @Robkk thanks, actually It works!

    But I realized that if a topic is marked as closed without replies, the code you posted replaced the CLOSED label.

    Is there a way to avoid label no-reply replace the closed label?

    I mean, how i can make closed label the priority?

    Regards,

    @robkk

    Moderator

    Add && !bbp_is_topic_closed() to the functions if statements after the zero and before the ).

    @arutam

    Participant

    Awesome! Thank You @Robkk, solved…

    You should visit my forum, looks pretty cool!

    @robkk

    Moderator

    @arutam if you want flaunt your forum in Pimp your Press and I will check it out there.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar