Created
November 1, 2016 22:12
-
-
Save thomasplevy/7daa912c1941ec4a9dfde490037a7b29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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