Site logo

Archived topic

Need to remove a blog archive "widget" from a page

3 replies · Started by Grant on May 6, 2019

Viewing posts 1–4 of 4

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?

Thanks in advance.

Screenshot of Problem

Hi there,

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' );

Thanks for the quick response David,

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.

Thanks again.

This archived topic is closed to new replies.