Learndash quiz is
But wait! Do not paste directly to function.php of the main theme. Use the child theme. Best way to use the code given below is to first install the WordPress plugin called –code snippets (search within wp plugin directory ) and
Code to paste in Code Snippet
add_filter("learndash_completion_redirect", function($link, $post_id) { if ($post_id == "2240") { $link='/bonus-1-1/'; return $link; } else { return $link; } }, 5, 2);
you could also just add ‘or’ conditions into the function above, if ($post_id == “2240” OR $post_id == “2650” OR $post_id == “3456”)… like wise…the Redirection happens when user completes quiz with IDS either 2240 or 2650 or 3456……in case of other quizzes , redirection will not happen
Comments are closed.