Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1260902
    Tim G
    Participant

    Hi

    I am trying to setup a sidebar support via a function to use LifterLMS learning system within my X theme.

    I have followed the instructions to do this here…

    Adding LifterLMS Sidebar Support to your custom or third-party theme

    Adding LifterLMS Sidebar Support to your custom or third-party theme

    And this is the function code I have added to my child theme. Should this work with X theme or is there another way I can solve this problem to display the LifterLMS Sidebar

    /**
    * 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-main’; // 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’ );

    I am testing this on my dev site the page is – http://usa.karltaylorphotography.fullenglish.net/blog/course/the-photography-club/

    and X Version: 4.6.4

    Thanks
    Tim

    #1260992
    Christian
    Moderator

    Hey Tim,

    I recommend you try the code. It looks like it is setup correctly. sidebar-main is the main sidebar in X.

    If this doesn’t work though, you will need to seek help from a developer as third party integration is outside the scope of our support.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1260902 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>