• Resolved Bruno Chériaux

    (@brunoeficiens)


    Hi Florent,

    I have a multisites setup with 1 site using a “parent theme” and 3 sites using 3 different “child themes”. I created a maintenance.php file in the “parent theme” and I want to use it for all the 4 sites.
    I suggest this update to the main plugin file:
    wp-maintenance.php line 647:

    /* Si on a une page maintenance.php dans le theme */
    if ( file_exists( get_stylesheet_directory() ) && file_exists( get_stylesheet_directory() . '/maintenance.php')) {
        $urlTpl = get_stylesheet_directory() . '/maintenance.php';
    } 
    /* Si on a une page maintenance.php dans le theme parent */
    elseif( file_exists( get_template_directory() ) && file_exists( get_template_directory() . '/maintenance.php') ) {
        $urlTpl = get_template_directory() . '/maintenance.php';
    } else {
        $urlTpl = '';
    }
    
    if( isset($paramMMode['pageperso']) && $paramMMode['pageperso']==1 && $urlTpl !== '' ) {
        include_once( $urlTpl );
        die();
    }  
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using maintenance.php from parent theme in child theme’ is closed to new replies.