Thanks, I finished it yesterday. If anyone else wants to do the same, I’d love to share a snippet of the code I used.
// Get the current course.
$course = LP_Global::course();
// Check if the course has the category "online-college".
if ($course && has_term('online-college', 'course_category', $course->id)) {
// If the course belongs to the "online-college" category, remove specific elements.
// Example: Remove the course description.
remove_action('learn-press/content-course-description', 'learn_press_course_description', 10);
// You can remove other elements similarly.
} else {
// If the course does not belong to the "online-college" category, restore the original settings.
add_action('learn-press/content-course-description', 'learn_press_course_description', 10);
// You can re-hook other actions similarly to restore the original settings.
}
-
This reply was modified 8 months, 3 weeks ago by soenarto.
-
This reply was modified 8 months, 3 weeks ago by soenarto.