Write Anything with Simplified’s AI Writer
SEO-driven copy. Plagiarism-free content. Generates in seconds
– oscarmini.com/how-i-use-bloggercom-to-host-images for free
Remove or Hide the “Mark Complete” Button in your ld lessons
// use this hook and add custom conditionals to hide the "Mark Complete" button on lesson pages
add_filter(
'learndash_mark_complete',
function( $return, $post ) {
if ( $post->post_type === 'sfwd-lessons' ) {
$return = "";
}
return $return;
},
10,
2
);
Enroll new user into multiple courses on registration as per official ld snippet
// Enroll new user into multiple courses on registration as per official ld snippet
add_action( 'user_register', function( $user_id ) {
// Comma separated array of course IDs
// Go here if you don't know how to find Course ID: https://www.learndash.com/support/docs/faqs/find-course-id/
$course_ids = [
27922,
27949,
];
// Add user to each course
foreach ( $course_ids as $course_id ) {
ld_update_course_access( $user_id, $course_id, $remove = false );
}
});