I use the LifterLMS plugin to deliver courses on my WordPress site. When LifterLMS lists all the courses in an archive, I get an unwanted blog post archive widget, as shown in the image below. Any ideas on how to make it go away?
did you register the LifterLMS sidebars in the Theme?
I use this function to register the right sidebar for Lifter:
/**
* Display LifterLMS Course and Lesson sidebars
* on courses and lessons in place of the sidebar returned by
* this function
* @param string $id default sidebar id (an empty string)
* @return string
*/
function my_llms_sidebar_function( $id ) {
$my_sidebar_id = 'sidebar-1'; // replace this with your theme's sidebar ID
return $my_sidebar_id;
}
add_filter( 'llms_get_theme_default_sidebar', 'my_llms_sidebar_function' );
/**
* Declare explicit theme support for LifterLMS course and lesson sidebars
* @return void
*/
function my_llms_theme_support(){
add_theme_support( 'lifterlms-sidebars' );
}
add_action( 'after_setup_theme', 'my_llms_theme_support' );
I did not initially register the LifterLMS sidebars with GP. I did use the LifterLMS Labs plugin to associate LifterLMS with the theme’s right sidebar and that works fine.
Also, note that in this example the page is set to full content and there is no sidebar.
I did register the sidebar with the coded you provided but still getting the same issue. I will also contact LifterLMS for their input.