Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Abdul

    (@iamabdul)

    Hi, to my surprise that actually worked.Thank you so much.i removed that one line and both PHP snippets worked together perfectly.Thanks again.That’s your kid? He is cuty & charming.

    You might want to add this snippet to your github post.I wanted to ask a general question as you are an expert.Is it necessary to put code in separate lines and with so many spaces in between?

    • This reply was modified 8 years, 3 months ago by Abdul.
    • This reply was modified 8 years, 3 months ago by Abdul.
    Thread Starter Abdul

    (@iamabdul)

    Hey Tom, Yes that code isn’t working with your PHP.when i put these two together, this error occurs.

    “Sorry, but your code causes a “Fatal error”, so it is not applied!
    Please, check the code and try again.”

    Let me be a little more clear.There are 3 sidebars i am talking about.Course sidebar,Lesson sidebar and theme’s right and left sidebars.I don’t use left one so its out of question.Here’s the problem.On course and lesson pages the Right sidebar is showing widgets.In short the course and lesson sidebars content does not show up.Here are screenshots:

    https://www.dropbox.com/s/4ps3ueogwgxfrrd/TESTCOURSE%20%E2%80%93%20PB%20Courses.png?dl=0

    https://www.dropbox.com/s/un2lq7p9zwbshmy/Widgets%20%E2%80%B9%20PB%20Courses%20%E2%80%94%20WordPress.png?dl=0

    please help fix it.Thanks

    • This reply was modified 8 years, 3 months ago by Abdul.
    Thread Starter Abdul

    (@iamabdul)

    Hey Tom, Thanks for help.I used the code in github and it corrected the sidebar placement for course catalog and membership catalog pages.But now the custom sidebar content doesn’t show up.In Lifter there is a course sidebar and a lesson sidebar, i have put course progress and course syllabus widgets in these sidebars but they don’t show up.I have recent post widget in the Right sidebar and it shows up on the course and lesson sidebars as well.

    it seems that the theme isn’t even picking up those custom sidebars and showing the default Right sidebar.I was using a code snippet before.It was showing the content from course and lesson sidebars.The only problem with that was catalog pages but now no content from custom sidebars shows up.Here is the code i was using before.

    <?php // don’t add this line to 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-1’; // replace this with your theme’s sidebar ID
    return $my_sidebar_id;
    }
    add_filter( ‘llms_get_theme_default_sidebar’, ‘my_llms_sidebar_function’ );

    • This reply was modified 8 years, 3 months ago by Abdul.
Viewing 3 replies - 1 through 3 (of 3 total)