have_posts() ) : $forum_query->the_post(); $i++; $parent_forums[] = get_the_ID(); $current_post = get_the_ID(); $is_active = $i == 1 ? 'is-active tab-active' : ''; $count_children = get_children( [ 'post_parent' => $current_post, 'post_type' => bbp_get_topic_post_type(), 'orderby' => 'menu_order', 'order' => 'asc', 'post_status' => [ 'any', 'spam' ], ] ); ?>
  • 0 ? count( $count_children ) : ''; ?>