Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Last active October 28, 2016 20:55
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/7a40d151fea15e469fd5a62d4116d45e to your computer and use it in GitHub Desktop.
Save thomasplevy/7a40d151fea15e469fd5a62d4116d45e to your computer and use it in GitHub Desktop.
Sliding Door WP Theme LLMS Sidebar Support
<?php // dont 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 = 'primary-widget-area'; // left side
$my_sidebar_id = 'secondary-widget-area'; // right side
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