• Resolved Abdul

    (@iamabdul)


    Hi, i am using GP theme and Lifter LMS plugin together.So far everything is good.There is only one issue that i can’t get fixed.Lifter LMS creates some default pages such as Purchase, My Courses, Courses Catalog etc.

    Now the single course and Lesson pages are working great but the Courses Catalog page isn’t showing the courses properly.I am adding a screenshot.
    Generatepress LifterLMS screenshot

    Only the Courses Catalog page shows this error.Now all courses show up on this page so i can’t afford to have it like this.Please help.Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    Just played with this, and it looks like adding support is very similar to WooCommerce.

    Simply add this PHP: https://gist.github.com/generatepress/7f324df1ee32bf389cc2e476739875dd

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    Let me know if you need more info ??

    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 7 years, 11 months ago by Abdul.
    Theme Author Tom

    (@edge22)

    And that code is no longer working along with the PHP I gave you?

    GP’s right sidebar is named sidebar-1, so that code should work as far as I can tell.

    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 7 years, 11 months ago by Abdul.
    Theme Author Tom

    (@edge22)

    That error might be caused by you including this line: <?php // don’t add this line to your functions.php file

    Can you try without that line to see if the two snippets of code work together?

    If not, we’ll dig a little deeper ??

    Thanks!

    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 7 years, 11 months ago by Abdul.
    • This reply was modified 7 years, 11 months ago by Abdul.
    Theme Author Tom

    (@edge22)

    Done ??

    This should be all that’s necessary: https://gist.github.com/generatepress/7f324df1ee32bf389cc2e476739875dd

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Styling issue with Lifter LMS default pages’ is closed to new replies.