• Resolved Ari123

    (@ucdguy)


    Hi,

    Thank you again for a great plugin!

    Tutor LMS is a course management plugin. It allows you to create courses, each of which contains lessons.

    By default, each of the courses have the following URL structure:

    website.com/courses/”course-name”

    and each of the lessons within that course has the following structure:

    website.com/courses/”course-name”/lesson/”lesson name”

    I’m trying to use this plugin so that courses are instead located at

    website.com/”course-name”

    and the lessons within that course are instead located at:

    website.com/”course-name”/”lesson name”

    I have no issue with the courses – I changed the default permastructure from courses/%courses% to %courses%.

    For the lessons, the default structure is stated in the plugin as lesson/%lesson%. I’ve tried changing that to %lesson%, %courses%/%lesson% among others. However, no matter what I do, it seems to forget its parent and always results in

    website.com/”lesson name”

    I have tried ticking and unticking the “Do not automatically append the slug” box to no avail. Also, the only way I can get it go back to its original structure of courses/”course-name”/lesson/”lesson name” is to delete the plugin. Resetting and regenerating everything doesn’t seem to achieve that.

    I’m not too sure how this plugin works with a parent/child, but should the default structure for lessons not have been stated in the plugin as courses/%courses%/lesson/%lesson%?

    Is there something obvious I am missing as to how I can get this to work?

    Thank you for your help! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Ari123

    (@ucdguy)

    After some more testing, I see that if I do nothing but install this plugin and then click “Save permastructures” (without changing any of the settings), any new lessons that I create lose their parent structure.

    In the video below, I created a fresh WordPress environment here. I then only did two things before the recording started: 1) installed Tutor LMS and 2) created a lesson.

    https://youtu.be/BypMwifmf1U

    Plugin Author Maciej Bis

    (@mbis)

    Hi @ucdguy,

    Contrary to inbuilt hierarchical ‘page‘ post type, the ‘courses‘ and ‘lesson‘ are a separate post types and they are not linked via ‘$post->parent‘, so %courses% tag will not be recognized by Permalink Manager.

    Tutor LMS connects the lessons to courses via a custom field, so in order to make %courses% tag working you will need to use an additional code snippet:

    https://permalinkmanager.pro/docs/basics/third-party-plugins-themes-support/#tutor-lms

    Could you try to add it to functions.php file in your child theme directory?

    Best regards,
    Maciej

    Thread Starter Ari123

    (@ucdguy)

    Ah, I had a feeling that there must be a page where you discussed specific plugins but for some reason I failed to find it.

    Snippet works perfectly. Thank you for your quick support, especially on the weekend! ??

    Plugin Author Maciej Bis

    (@mbis)

    @ucdguy No problem at all ?? I am happy to help.

    Thread Starter Ari123

    (@ucdguy)

    Hi again!

    I had been testing this plugin in a sandbox environment with the latest version of this plugin and Tutor LMS.

    However, on my actual website, I am using Tutor LMS 1.9.x rather than Tutor LMS 2.x as I (like many others) find Tutor LMS 2.x to be very buggy.

    Unfortunately, that snippet does not seem to work on Tutor LMS 1.9.x.

    Do you recall if you wrote an older version of that script before Tutor LMS 2.0 was released? Or do you have any idea as to how I could go about figuring out what I need to change in that snippet in order to get it to work on Tutor LMS 1.9.x?

    Thank you again for your help! ??

    Plugin Author Maciej Bis

    (@mbis)

    Hi @ucdguy,

    Could you try to use the below version of code snippet instead?
    https://pastebin.com/EpTifaeB

    Best regards,
    Maciej

    Thread Starter Ari123

    (@ucdguy)

    Perfect, thank you again for you quick response! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Tutor LMS and Hierarchy’ is closed to new replies.