Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Created November 1, 2016 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasplevy/7daa912c1941ec4a9dfde490037a7b29 to your computer and use it in GitHub Desktop.
Save thomasplevy/7daa912c1941ec4a9dfde490037a7b29 to your computer and use it in GitHub Desktop.
<?php // don't copy this line
/**
* 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-2'; // first sidebar
// $my_sidebar_id = 'sidebar-1'; // second sidebar
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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment