bp_search_get_total_topics_count( $lesson_id )

Returns total number of LearnDash topics

Description

Source

File: bp-search/bp-search-functions.php

function bp_search_get_total_topics_count( $lesson_id ) {
	$course_id = learndash_get_course_id( $lesson_id );
	$topic_ids = learndash_course_get_children_of_step( $course_id, $lesson_id, 'sfwd-topic' );

	return count( $topic_ids );
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.