bbp_get_topic_post_type(), 'posts_per_page' => 5, 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC', )); // Get recent replies. $recent_replies = new WP_Query(array( 'post_type' => bbp_get_reply_post_type(), 'posts_per_page' => 5, 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC', )); // Get pending/spam topics. $pending_topics = new WP_Query(array( 'post_type' => bbp_get_topic_post_type(), 'posts_per_page' => -1, 'post_status' => array('pending', 'spam'), )); $pending_count = $pending_topics->found_posts; // Calculate engagement metrics. $avg_replies_per_topic = $published_topics > 0 ? round($published_replies / $published_topics, 1) : 0; ?>

0): ?> +
0): ?>

have_posts()): ?>
    have_posts()): $recent_topics->the_post(); $topic_id = get_the_ID(); $author_id = get_the_author_meta('ID'); $author_name = get_the_author(); $topic_forum = bbp_get_topic_forum_id($topic_id); $forum_title = get_the_title($topic_forum); $reply_count_topic = bbp_get_topic_reply_count($topic_id); ?>

    ID; $author_id = $unanswered_topic->post_author; $author_name = get_the_author_meta('display_name', $author_id); $topic_forum = bbp_get_topic_forum_id($topic_id); $forum_title = get_the_title($topic_forum); ?>
  • post_title); ?>
    post_date), current_time('timestamp'))); ?>

have_posts()): ?>
    have_posts()): $recent_replies->the_post(); $reply_id = get_the_ID(); $author_id = get_the_author_meta('ID'); $author_name = get_the_author(); $reply_topic = bbp_get_reply_topic_id($reply_id); $topic_title = get_the_title($reply_topic); $reply_content = wp_trim_words(get_the_content(), 15, '...'); ?>