Contents
Snippet #
Important: All snippets are provided as-is without support or guarantees. These snippets are provided as guidelines for advanced users looking to customize LearnDash. For any additional help or support with these snippets, we recommend reaching out to a LearnDash Expert.
LearnDash – Adds the course content beneath the prerequisite alert message
function ld_course_content_after_alert() {
$courseid = learndash_get_course_id();
$user_id = get_current_user_id();
if ( ! learndash_course_completed( $user_id, $courseid ) ) {
$coursecontent = get_the_content();
echo $coursecontent;
}
}
add_action( 'learndash-alert-after', 'ld_course_content_after_alert' );