diff --git a/classes/class-ctlearndash.php b/classes/class-ctlearndash.php index 2bbed94..d54c64f 100644 --- a/classes/class-ctlearndash.php +++ b/classes/class-ctlearndash.php @@ -234,9 +234,15 @@ public function enqueue_scripts() { // Custom CSS to hide elements from LearnDash when a custom template is used. $css = ' - .custom-template-lifterlms :not(.custom-template-learndash-content) .btn-join, - .custom-template-lifterlms :not(.custom-template-learndash-content) #learndash_course_status, - .custom-template-lifterlms :not(.custom-template-learndash-content) #learndash_course_materials { + .custom-template-lifterlms .custom-template-learndash-content .btn-join, + .custom-template-lifterlms .custom-template-learndash-content #learndash_course_status, + .custom-template-lifterlms .custom-template-learndash-content #learndash_course_materials { + display: initial; + } + + .custom-template-lifterlms .btn-join, + .custom-template-lifterlms #learndash_course_status, + .custom-template-lifterlms #learndash_course_materials { display: none; } '; @@ -278,7 +284,7 @@ public function override_template_include() { */ public function render( $content ) { - $content .= '
'; + $content = '
'; $template = get_course_meta_setting( get_the_id(), 'learndash_course_template' ); if ( $template ) {