Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Remove enroll button for offline courses
Tagged: h
- This topic has 8 replies, 2 voices, and was last updated 7 years ago by nursesed.net.
Viewing 9 posts - 1 through 9 (of 9 total)
-
AuthorPosts
-
November 29, 2017 at 11:29 pm #137577nursesed.netParticipantHi, I need to remove the Enroll button for offline courses. Is there code I can use to do that? Can I replace the Enroll button with a shortcode for a plugin? Thank you!November 30, 2017 at 5:57 am #137602H.K. LatiyanParticipantHi, You can hide the course button after the user is enrolled in the course. You can also link that button to an external link i.e. when the user click on the enrol button then she is redirected to a custom link set by you in the setting.November 30, 2017 at 6:03 pm #137712nursesed.netParticipantHi Latiyan, Thank you for the quick response. I need to remove the button all together, because I'm using a different scheduling system for our offline classes. We are required to use that system for our offline classes - and it's through a plugin with a shortcode. It's not just a link. Here's a screenshot: I really need to either remove that section, or do something entirely different with the button. Can I add an image instead of the button? Can I change only the offline button text to say something like Download a Study Guide"? I still need the button to say Enroll for the online classes.December 1, 2017 at 11:48 am #138617H.K. LatiyanParticipantHi, Yes you can change the label, add the below code in your wplms-customizer.php file present in your wplms customizer plugin: add_filter('wplms_take_this_course_button_label',function($credits,$course_id){ $check = get_post_meta($course_id,'vibe_course_offline',true); if( !empty($check) && $check == 'S' ){ $label = 'Download a Study Guide'; return '<strong><span class="coming_soon">'.$label.'</span></strong>'; } return $credits; },99,2); Change the text in the code according to your requirements.December 4, 2017 at 10:09 pm #138879nursesed.netParticipantI only need to change the label for offline courses. Is the code above specifically for that, or it will apply the label to all LMS courses?December 5, 2017 at 12:53 pm #138925H.K. LatiyanParticipantHi, Yes, the above code is only for offline courses.December 5, 2017 at 10:08 pm #139003nursesed.netParticipantThank you! I inserted the code in the wplms-customizer.php file, but the button says "Private Course" Do I have to attach a product for this to become effective? I really didn't want to create products for offline courses.December 6, 2017 at 6:02 am #139025H.K. LatiyanParticipantHi, The above code is not for private courses. If you want it to work for courses which are private and offline courses then add the below code: add_filter('wplms_private_course_button_label',function($credits,$course_id){ $check = get_post_meta($course_id,'vibe_course_offline',true); if( !empty($check) && $check == 'S' ){ $label = 'Download a Study Guide'; return '<strong><span class="offline">'.$label.'</span></strong>'; } return $credits; },99,2);December 7, 2017 at 11:25 pm #139263nursesed.netParticipantThank you! I was able to change the buttons label on these classes with your code.
-
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
- The topic ‘Remove enroll button for offline courses’ is closed to new replies.