Support » Fixing WordPress » Since upgrading "Unable to locate the main framework files"

  • Resolved dadalab

    (@dadalab)


    Running Pagelines with a child theme “Baseline” that was working fine prior to upgrade. Now all pages on site have this text running across top:
    Unable to locate the main framework files! Make sure the parent theme folder is named correctly.

    I think the issue is in my setup.php which includes that reference but not sure what to change

    /**
     * REQUIRE THE FRAMEWORK FILES
     * --- This is some checking, and you should not have to touch this code (unless directed) ---
     * 3.4 compat added
     */
    
    if ( function_exists( 'wp_get_theme' ) ) {
    	$parent_folder = wp_get_theme( basename( __DIR__ ) )->get( 'Template' );
    } else {
    	$theme_data = get_theme_data(STYLESHEETPATH . '/style.css');
    	$parent_folder = $theme_data['Template'];
    }
    $init_file = WP_CONTENT_DIR .'/themes/' . $parent_folder . '/functions.php';
    
    if ( file_exists( $init_file ) )
    	require_once( $init_file );
    else
    	add_action( 'template_redirect', create_function( '', 'echo "<p>Unable to locate the main framework files! Make sure the parent theme folder is named correctly.</p>";' ) );

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Since upgrading "Unable to locate the main framework files"’ is closed to new replies.