Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Created November 17, 2016 07:01
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/a34e0a14a50deda83f2eddb6451e7817 to your computer and use it in GitHub Desktop.
Save thomasplevy/a34e0a14a50deda83f2eddb6451e7817 to your computer and use it in GitHub Desktop.
<?php // don't copy this line to your functions.php file
/**
* 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';
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