Skip to content

How To Add “Resolved” To Closed Topics In bbPress

If you even used WordPress’ support forum, you’ll see the “Resolved” stamp in every closed topic. You can also add “Resolved” to closed topics in your bbPress installation by adding following snippet to the functions.php file of your current theme:

add_action( 'bbp_theme_before_topic_title', 'bavotasan_resolved_topics' );
/**
 * Add "Resolved" to closed topics
 *
 * This function is attached to the 'bbp_theme_before_topic_title' action hook.
 * @author c.bavota
 */
function bavotasan_resolved_topics() {
   $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="resolved">[Resolved]</span>';
}

This amazing snippet comes from my favorite bavotasan.com. Congrats to c.bavota on the good news :)

1 thought on “How To Add “Resolved” To Closed Topics In bbPress”

  1. I’ve been using “close” = “resolved” like this for a long time. But I think we still need to use “resolved” as a separated term, just in case we mark the topic “resolved” but users can still add comments if they want

Leave a Reply to Anh Tran Cancel reply

Your email address will not be published. Required fields are marked *