Skip to content

Templates

LMS Notes uses overridable templates for its front-end output, so you can customize the markup from your theme without editing the plugin.

When the plugin loads a template it looks in this order and uses the first match:

  1. your-theme/notes/<template-name>
  2. your-theme/<template-name>
  3. lms-notes/templates/<template-name> (the plugin default)

The theme subfolder (notes/) can be changed with the lcn_template_path filter.

Copy any of these files from the plugin’s templates/ folder into your-theme/notes/ and edit the copy:

Template Used for
single-lcn_notes.php The single-note page.
bp-lms-instructor-notes.php The All Notes list (the [lms_instructor_notes] output).
lms-notes-filter.php The filter/search bar on the All Notes page.

lcn_get_template() fires two actions around every include, which you can use instead of copying a whole file:

  • lcn_before_template_part
  • lcn_after_template_part

Both receive $template_name, $template_path, $located, and $args.

Override the single-note template:

  1. Create the folder your-theme/notes/.
  2. Copy wp-content/plugins/lms-notes/templates/single-lcn_notes.php into it.
  3. Edit your-theme/notes/single-lcn_notes.php.

Your copy now loads instead of the plugin default.