Skip to content

Instantly share code, notes, and snippets.

@tpkemme
Last active December 9, 2016 00:10
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 tpkemme/1463834777d72e93267f66e83a6edead to your computer and use it in GitHub Desktop.
Save tpkemme/1463834777d72e93267f66e83a6edead to your computer and use it in GitHub Desktop.
Solstice sidebar compat
<?php // don't copy this line into 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'; // 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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment