Template Overrides

Overview

Uncanny Groups for LearnDash allows developers to customize front-end templates without editing plugin files directly. By placing override files in your theme, your customizations survive plugin updates.

Developer feature: Template overrides require PHP development experience. We cannot provide support for custom code. Only attempt customizations if you are comfortable working with PHP templates.

How Template Overrides Work

Template overrides were introduced in Uncanny Groups version 3.0.4. The plugin checks your active theme for a matching template file before falling back to its own. If a match is found in your theme, the theme file is used instead.

This means you can safely modify the plugin’s output and your changes will not be overwritten when the plugin updates.

Override Directory Structure

Template files live inside the plugin at:

wp-content/plugins/uncanny-learndash-groups/src/templates/

To override a file, copy it into your theme using the same folder structure, but omit the /src/templates/ prefix. Place overrides inside a folder named uncanny-groups/ at the root of your theme.

wp-content/themes/your-theme/uncanny-groups/

Step-by-Step: Creating a Template Override

  1. Locate the template file you want to customize inside the plugin:
wp-content/plugins/uncanny-learndash-groups/src/templates/
  1. Copy the file to your theme, replicating the subfolder path and omitting /src/templates/:
wp-content/themes/your-theme/uncanny-groups/
  1. Edit the copy in your theme. The plugin will now load your version instead of its own.
  1. Test your changes on the front end to confirm the override is working correctly.

Important: Never edit files inside wp-content/plugins/uncanny-learndash-groups/ directly. Plugin updates will overwrite any changes you make there.

Worked Example

Suppose you want to customize the users table actions in the Group Management page.

Source file (plugin — do not edit):

wp-content/plugins/uncanny-learndash-groups/src/templates/frontend-uo_groups/users-table-actions.php

Override file (your theme — edit this):

wp-content/themes/your-theme/uncanny-groups/frontend-uo_groups/users-table-actions.php

The plugin detects the file in your theme and loads it instead of the default.

Child Themes

If you are using a child theme, place override files in the child theme’s directory rather than the parent theme. WordPress loads child theme files first, so the override will still be detected correctly.

wp-content/themes/your-child-theme/uncanny-groups/

Compatibility Note

Uncanny Groups integrates with LearnDash, WooCommerce, Gravity Forms, and Theme My Login. Some templates interact with these plugins. We recommend reviewing integration-specific templates carefully before modifying them, and thoroughly testing any overrides in a staging environment before deploying to production.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top