Created
June 2, 2017 18:36
-
-
Save zgordon/b290842a35ac462d4387c6735b1a7bc2 to your computer and use it in GitHub Desktop.
This hook let's you redirect to a custom page when a LearnDash course is completed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_course_completed_redirect($link, $course_id) { | |
$link = get_post_field( 'post_name', $course_id ); | |
//You can change the link here | |
return '/congrats/' . $link; | |
} | |
add_filter("learndash_course_completion_url", custom_course_completed_redirect, 5, 2); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can this be revised to redirect a lesson?