Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Close topic label

@wpturk

Participant

Hi, I am glad the code helped you.

To attach label to the topic title on the topic page, you can try @robin ‘s code with a minor change. (below) This may not work in all themes since the title is coming from a template file.

function rew_add_close_to_the_topics ($title) {

        if ( bbp_is_topic_closed()) {
                $closed = '[Closed]' ;
                $sep = ' ' ;
                $position = 'after' ;
                if (($position == 'before') && !str_contains($title, $closed)) $title = $closed.$sep.$title ;
                if (($position =='after') && !str_contains($title, $closed)) $title = $title.$sep.$closed ;
        }
return $title ;
}
add_filter ('single_post_title' , 'rew_add_close_to_the_topics');
Skip to toolbar