Skip to content

Instantly share code, notes, and snippets.

@creativeartbd
creativeartbd / single-course.php
Last active July 13, 2023 16:12
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.
<?php
/**
* Template for displaying single course
*
* @since v.1.0.0
*
* @author Themeum
* @url https://themeum.com
*
* @package TutorLMS/Templates
//disable redux dev mode
if ( ! function_exists( 'wppoliticalz_redux_disable_dev_mode_plugin' ) ) {
function wppoliticalz_redux_disable_dev_mode_plugin( $redux ) {
if ( $redux->args['opt_name'] != 'redux_demo' ) {
$redux->args['dev_mode'] = false; //helps to disable dev mode but in localhost ad still appear
$redux->args['forced_dev_mode_off'] = false; //helps to disable ad totally
}
}
add_action( 'redux/construct', 'wppoliticalz_redux_disable_dev_mode_plugin' );