Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix horizontal scroll on Course page when using Course theme #7705

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/fix-course-horizontal-scroll-with-course-theme
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix horizontal scroll on Course page when using Course theme
2 changes: 1 addition & 1 deletion includes/3rd-party/themes/astra.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/3rd-party/themes/course.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/3rd-party/themes/divi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading