I know this is a bit out of the support rhelm, but thought i would post as others may have this same issue.
Pro theme does not declare theme support by default fo Sensei LMS. I followed this guide and got mostly there: https://senseilms.com/documentation/enabling-theme-support/
This is what i added in my functions doc:
// Sensei wrapper fix for theme support
// =============================================================================
add_action( 'after_setup_theme', 'declare_sensei_support' );
function declare_sensei_support() {
add_theme_support( 'sensei' );
}
global $woothemes_sensei;
remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 );
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 );
add_action('sensei_before_main_content', 'my_theme_wrapper_start', 10);
add_action('sensei_after_main_content', 'my_theme_wrapper_end', 10);
function my_theme_wrapper_start() {
echo '<div class="x-container max width offset sensei-custom-wrapper">
<div class="x-main left" role="main">';
}
function my_theme_wrapper_end() {
echo '</div>';
get_sidebar();
echo '</div>';
}
This worked all around except for the single course page. It seams for some reason to add the sidebar and footer within the <div class="x-main left" role="main">
area. This then messes up the page layout.
I believe this is happening because the page is structured differently and i’m not able to set a pro theme template to the page.
My question is:
- is it possible to exclude the course page? Either a function that does it for all pages? Or by adding the Id’s of the specific courses?
- otherwise is there any way to make this work all around?
The lessons pages without the function as well as the single course pages work just fine without the custom wrappers, however the messages and results pages don’t work at all without it.
Thank you in advance!