Snippet displaying LearnDash parent course title with lesson title [closed]

You can get the current post’s course ID from learndash_get_course_id(), e.g.

$course_id = learndash_get_course_id();
if (isset($course_id) && $course_id) echo esc_html(get_the_title($course_id));

Under the covers it’s stored in a post meta value course_id, but you might as well use their helper function to read it.