container-fluid class into author-course.php

Home Forums Legacy Support Support queries Other issues container-fluid class into author-course.php

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #16420
    eggeno
    Spectator
    I 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!
    #16575
    Anshuman Sahu
    Keymaster
    YOu 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 .
    #16577
    eggeno
    Spectator
    Hi 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?
    #16773
    Anshuman Sahu
    Keymaster
    The 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 .
    #16785
    eggeno
    Spectator
    Alex, 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 mean
    #16983
    Anshuman Sahu
    Keymaster
    Include 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 . /

    #17011
    eggeno
    Spectator
    OK! Thanks
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘container-fluid class into author-course.php’ is closed to new replies.