File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * LifterLMS Solstice Theme Compatibility.
4
+ *
5
+ * https://lifterlms.com/docs/solstice-theme-sidebar-compatibility/
6
+ *
7
+ * You can add this recipe to your site by creating a custom plugin
8
+ * or using the Code Snippets plugin available for free in the WordPress repository.
9
+ * Read this companion documentation for step-by-step directions on either method.
10
+ * https://lifterlms.com/docs/adding-custom-code/
11
+ */
12
+
13
+ /**
14
+ * Display LifterLMS Course and Lesson sidebars
15
+ * on courses and lessons in place of the sidebar returned by
16
+ * this function
17
+ * @param string $id default sidebar id (an empty string)
18
+ * @return string
19
+ */
20
+ function my_llms_sidebar_function ( $ id ) {
21
+ $ my_sidebar_id = 'sidebar ' ; // replace this with your theme's sidebar ID
22
+ return $ my_sidebar_id ;
23
+ }
24
+ add_filter ( 'llms_get_theme_default_sidebar ' , 'my_llms_sidebar_function ' );
25
+
26
+
27
+ /**
28
+ * Declare explicit theme support for LifterLMS course and lesson sidebars
29
+ * @return void
30
+ */
31
+ function my_llms_theme_support (){
32
+ add_theme_support ( 'lifterlms-sidebars ' );
33
+ }
34
+ add_action ( 'after_setup_theme ' , 'my_llms_theme_support ' );
You can’t perform that action at this time.
0 commit comments