diff --git a/includes/3rd-party/themes/astra.php b/includes/3rd-party/themes/astra.php index fea5a4d201..311c2391e2 100644 --- a/includes/3rd-party/themes/astra.php +++ b/includes/3rd-party/themes/astra.php @@ -12,7 +12,7 @@ function sensei_load_learning_mode_styles_for_astra_theme() { $course_id = Sensei_Utils::get_current_course(); $is_target_theme = 'astra' === strtolower( wp_get_theme()->get_template() ); - if ( empty( $course_id ) || ! $is_target_theme ) { + if ( empty( $course_id ) || ! $is_target_theme || 'course' === get_post_type() ) { return false; } diff --git a/includes/3rd-party/themes/course.php b/includes/3rd-party/themes/course.php index 1b7e1d257d..70c3ecf35b 100644 --- a/includes/3rd-party/themes/course.php +++ b/includes/3rd-party/themes/course.php @@ -12,7 +12,7 @@ function sensei_load_learning_mode_style_for_course_theme() { $course_id = Sensei_Utils::get_current_course(); $is_course_theme = 'course' === wp_get_theme()->get_template(); - if ( empty( $course_id ) || ! $is_course_theme ) { + if ( empty( $course_id ) || ! $is_course_theme || 'course' === get_post_type() ) { return false; } diff --git a/includes/3rd-party/themes/divi.php b/includes/3rd-party/themes/divi.php index 357c4542d0..e63dc1fd43 100644 --- a/includes/3rd-party/themes/divi.php +++ b/includes/3rd-party/themes/divi.php @@ -97,7 +97,7 @@ function sensei_load_learning_mode_style_for_divi_theme() { $course_id = Sensei_Utils::get_current_course(); $is_target_theme = 'divi' === strtolower( wp_get_theme()->get_template() ); - if ( empty( $course_id ) || ! $is_target_theme ) { + if ( empty( $course_id ) || ! $is_target_theme || 'course' === get_post_type() ) { return false; }