Home › Forums › Legacy Support › Support queries › Other issues › container-fluid class into author-course.php
- This topic has 6 replies, 2 voices, and was last updated 8 years, 10 months ago by eggeno.
-
AuthorPosts
-
January 3, 2016 at 2:11 pm #16420eggenoSpectatorI have edited author-course.php: I have inserted the container-fluid bootstrap class but the changes do not take effect. I also tried to insert the snippet code of this url: https://wplms.io/support/forums/topic/override-author-course-php/ but if I insert this code in functions.php of my child theme the result is a blank page. Please, can you give me a solution? Thanks in advance. Best regards!January 4, 2016 at 1:07 pm #16575Anshuman SahuKeymasterYOu have to add the code in your child theme functions.php file to make it work and then it will load you custom author-course.php file from your child theme .January 4, 2016 at 1:10 pm #16577eggenoSpectatorHi Alex, I have already done this test and the result is a blank page. I had already written in the previous message! Please can you check?January 5, 2016 at 1:42 pm #16773Anshuman SahuKeymasterThe topic is to override the instructing-courses page which is : http://prntscr.com/9mcvp1 We have already override the author-courses.php file in the modern child theme . If you want to override the instructor course which is with this layout : http://prntscr.com/9mcvj5 then you need override the home.php file of the parent theme using your child theme . copy the members folder in your child theme . And then edit the home.php file in your members/single/ folder in your child theme .January 5, 2016 at 2:21 pm #16785eggenoSpectatorAlex, I'm not using modern child theme. I'm using wplms blank child theme and I want the author-course.php page with the container-fluid class. I had this same problem with search.php page and you've solved, by sending a new search.php file. Refer to this link: https://wplms.io/support/forums/topic/search-template-with-container-fluid-bootstrap-class/ I attach a screenshot so you understand better what I meanJanuary 6, 2016 at 12:41 pm #16983Anshuman SahuKeymasterInclude this function in your child theme functions.php file if not :
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';
} } Then copy the author.php file from your main then into child theme . Then you are ready to override the author-course.php file of the main theme . /
January 6, 2016 at 4:19 pm #17011eggenoSpectatorOK! Thanks -
AuthorPosts
- The topic ‘container-fluid class into author-course.php’ is closed to new replies.