TutorLMS plugin bug/integration


After adding a course in TutorLMS editor (TutorLMS > Courses), the course is not inheriting the appropriate template on the frontend. In fact, it is not inheriting any available template at all.

Steps to reproduce the issue:

On the image below you can see that I created a template named “Course: Single” which is containing only a section with a heading and another section with a post content element.

This template is supposed to be inherited by a single course page on the front end. But it is not happening.

To demonstrate this, you can see on the image below what previewing a single course (created in TutorLMS) on the frontend looks like. Even though I assigned a template “Course: Single” for the course page in the gutenberg editor, it is not inheriting the template.

Funny thing is that in the WP Admin toolbar, we can see that in fact it is trying to call for assigned template (Template: course-single), but it is not happening.

Environment info:

  • WordPress version: 5.9.3
  • Gutenberg Plugin version: None. Gutenberg was not installed.
  • Cwicly Plugin version: 1.1.4
  • Cwicly Theme version: 1.0.3

Hi @Dev.tomi,

I’m not familiar with TutorLMS so please bear with.

Quickly looking at this, TutorLMS doesn’t seem to take into account FSE, and overwrites the template even if one is specified in the Template area.

With add_filter('tutor_lms_should_template_override', '__return_false'); you can instantly see that the template is properly used when accessing the course.

The 'tutor_get_template_path' filter might also be of use.

This is an instance where TutorLMS is better suited to reply to this as it isn’t per se a bug on our side.

I added a snippet add_filter(‘tutor_lms_should_template_override’, ‘__return_false’); via Code snippets plugin and it did not help.

However, I think this is a case that should be forwarded to TutorLMS support as you said.

Revisiting this.

The code snippet provided above does indeed work but has to be called early to make sure that it applies.

Moving to fixed.