Yoast/RankMath Issue (Broken Dashboard)

For some users, who are using Yoast/Rank Math on their site and an overridden child theme file, the Tutor LMS dashboard got broken in some instances. This doc aims to provide for fix this.

Check that if the site is using a child theme. Access the folder from the website server and navigate to the file that you overrode. Open the file with an editor.

Now, on the top and bottom, you can see this function called get_header() and get_footer()

To fix the broken dashboard issue replace the get_header() function with

$is_by_short_code = isset($is_shortcode) && $is_shortcode===true;
if(!$is_by_short_code && !defined( 'OTLMS_VERSION' ))  {
    get_header();
}

and replace the get_footer() function with:

if(!$is_by_short_code && !defined( 'OTLMS_VERSION' )) {
    get_footer();
}

Was this helpful?