Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Custom course landing page for non-enrolled visitors

  • I’m buidling a website to sell video courses. My theme is GP, my LMS is LearnDash and my membership plugin is Memberpress.

    Now, LearnDash has a default implementation of a course page, which is alright for enrolled students, but isn’t very attractive to non-enrolled visitors. So, I want to modify the course page for non-enrolled visitors only.

    I found course.php file in LearnDash plugin directory. As far as I understand, I can achieve what I want by modifying this file (and others that it references). I’m noob in PHP and WP, but I think I can handle this task. However, what I don’t understand is how I can replace the implementation of this file with my own, while ensuring that it won’t be overriden on plugin update.

    I already have a child theme, so I guess I need to copy-paste some files from LD plugin’s directory to… here I need your help. In this situation, when I want to modify external plugin files, what’s the best approach?

    I also suspect that there might be much simpler solution to this task. Maybe I can create my own custom template for GP which will check if the user is enrolled in the course. If not, it will show my custom UI, otherwise, it’ll delegate to LD’s code.

    Or, maybe, there even a simpler solution?

    I realize that you can’t help me with the third-party plugin, but this part I can handle. I just need someone familiar with WP/GP to show me the general direction.

    Thanks in advance.

  • Hi there,

    ok, if you add a “file” in a child theme, then that will not get updated when themes or plugins update.

    the default structure and URI for your child theme folder is:

    wp-content/themes/child-theme/

    and to overwrite a plugins template if they allow it, means you have to add the necessary folder structure and copy of the template in your child theme.

    For learndash course.php i would expect you to place a copy of the template in the child theme, like so:

    wp-content/themes/child-theme/learndash/course/course.php

    You can try that, but if you can ask LearnDash to confirm the correct URI

  • So simple, I should’ve thought about this myself. I’ll try that and contact LD if I’ll have troubles.
    Thanks David. You provide a lightning-quick support, as usual.

  • Let us know if it works or what Learndash says 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.