How Override author-course.php in child theme?
Thanks
Add this code in your child theme functions.php file and then you are ready to go to override the author-course.php file .
add_filter( 'template_include','wplms_check_instructing_courses_endpoint12',99,2);
function wplms_check_instructing_courses_endpoint12($template){
if(!is_author())
return $template;
global $wp_query;
$instructing_courses=apply_filters('wplms_instructing_courses_endpoint','instructing-courses');
if ( !isset( $wp_query->query_vars[$instructing_courses] ) ){
$wp_query->set( 'post_type', array('post') );
return get_stylesheet_directory().'/author.php';
}else{
$wp_query->set( 'post_type', array('course') );
return get_stylesheet_directory().'/author-course.php';
}
}