Hiding reviews section in single course page if there are no reviews added

Please add this code in yor wplms-customizer.php file in wplms customiezr plugin :

add_action('wp_head',function(){
 global $post;
 if(!empty($post) && $post->post_type == 'course'){
   if(empty($post->comment_count) || (!empty($post->comment_count) && $post->comment_count < 1)){
     echo '<style>.single-course .course_reviews{ display:none !important;}</style>';
   }
 }
});

 

Was this article helpful?

Related Articles

Leave A Comment?