-
-
Save bernhardkaindl/e3f3a1b9c10e09270f31081764167080 to your computer and use it in GitHub Desktop.
Tutor LMS - Hide the content as well as the topic list for password protected course. So, go to wp-content/plugins/tutor/templates/single-course.php file and then replace all the code by this gist code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template for displaying single course | |
* | |
* @since v.1.0.0 | |
* | |
* @author Themeum | |
* @url https://themeum.com | |
* | |
* @package TutorLMS/Templates | |
* @version 1.4.3 | |
*/ | |
get_header(); | |
do_action('tutor_course/single/before/wrap'); | |
?> | |
<div <?php tutor_post_class('tutor-full-width-course-top tutor-course-top-info tutor-page-wrap'); ?>> | |
<div class="tutor-container"> | |
<div class="tutor-row"> | |
<div class="tutor-col-8 tutor-col-md-100"> | |
<?php do_action('tutor_course/single/before/inner-wrap'); ?> | |
<?php tutor_course_lead_info(); ?> | |
<?php if ( ! post_password_required() ) : ?> | |
<?php tutor_course_content(); ?> | |
<?php tutor_course_benefits_html(); ?> | |
<?php tutor_course_topics(); ?> | |
<?php else : ?> | |
<?php echo get_the_password_form(); ?> | |
<?php endif; ?> | |
<?php tutor_course_instructors_html(); ?> | |
<?php tutor_course_target_reviews_html(); ?> | |
<?php do_action('tutor_course/single/after/inner-wrap'); ?> | |
</div> <!-- .tutor-col-8 --> | |
<div class="tutor-col-4"> | |
<div class="tutor-single-course-sidebar"> | |
<?php do_action('tutor_course/single/before/sidebar'); ?> | |
<?php tutor_course_enroll_box(); ?> | |
<?php tutor_course_requirements_html(); ?> | |
<?php tutor_course_tags_html(); ?> | |
<?php tutor_course_target_audience_html(); ?> | |
<?php do_action('tutor_course/single/after/sidebar'); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php do_action('tutor_course/single/after/wrap'); ?> | |
<?php | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment