Show Back to course Button above the accordion

This code is very useful for those who find it difficult to scroll down all the sections of the course to click on back to course button.
This will show back to course button above course sections on course status page
Paste this code in wp-admin > Plugins > Editor > WPLMS Customizer Plugin > wplms-customizer.php

add_action(‘wplms_course_start_after_time’,‘show_back_to_course_button_above’);
function show_back_to_course_button_above(){
if(!empty($_POST[“course_id”])){
     $course_id=$_POST[“course_id”];
}
if(empty($course_id) && !empty($_COOKIE[‘course’])){
   $course_id=$_COOKIE[‘course’];
}
echo ‘<div style=” background: #fff; color:#000; margin-top: 10px; padding:5px;”><a href=”‘.get_permalink($course_id).‘” class=” full button”>BACK TO COURSE</a></div>’;
}

Was this article helpful?

Related Articles

Leave A Comment?