On the course page, a description has been written above the curriculum.
Please let me know how to hide this description content for logged in users and show to only non logged in users.
Add this custom css in wp-admin > appearance > customize > custom css
.single-course.logged-in .course_description{display:none !important;}
This will hide course description for logged in users
Could you please help me to hide the course description only from subscribed students/ users for that particular course. That is more logical.
add_action('wp_head','hide_course_description_from_enrolled');
function hide_course_description_from_enrolled(){
global $post, $wpdb;
$course_id = $post->ID;
if(bp_is_single_course()){
$students_undertaking = bp_course_get_students_undertaking();
if(!empty($students_undertaking)){
foreach($students_undertaking as $student){
?>
<style>
.single-course.logged-in .course_description{display:none !important;}
</style>
<?php
}
}
}
}
Add the above code in wp-admin > Plugins > Editor > Select WPLMS Customizer Plugin > wplms-customizer.php
And add the code > save
This code will remove the course description for those users who are enrolled in that course