Template Overrides Estimated reading: 2 minutes 4 views Summary: Learn how to safely customize EazyLMS course pages using template overrides. Follow this guide to ensure your changes remain update-safe while maintaining full compatibility with the plugin's core functionality. Template overrides in EazyLMS provide a powerful and flexible way to customize the appearance of your course pages without modifying core plugin files. By utilizing the WordPress template hierarchy, developers can ensure that their customizations remain intact even after plugin updates, providing a clean and maintainable development workflow. Understanding Template Overrides EazyLMS is designed to work seamlessly with your active WordPress theme. While the plugin provides a beautifully designed default interface, you may occasionally need to adjust layouts to match specific branding requirements. Instead of editing the plugin source code directly, which would result in your changes being overwritten during updates, you can leverage the theme’s override directory. How to Override Templates To safely modify the course page templates, follow these structured steps within your theme folder: Navigate to your theme directory (e.g., /wp-content/themes/your-theme/). Create a new directory named eazylms if it does not already exist. Locate the template file you wish to modify inside the plugin directory: eazylms/eazydocs/single-docs.php. Copy the desired file into your theme’s eazylms/eazydocs/ folder. Edit the copied file. EazyLMS will now automatically prioritize this file over the default one provided by the plugin. Best Practices for Customization When working with template overrides, keep the following considerations in mind to ensure compatibility with Managing User Roles and Access in Docy: Best Practices and Plugin Recommendations and other core features: Preserve Functionality: Ensure that all necessary hooks, such as the_content() and specific EazyLMS action triggers, remain present in your overridden files. Removing these may break essential features like progress tracking or enrollment buttons. Stay Updated: Regularly check your overrides against the latest plugin updates. If the plugin’s template structure changes significantly, you may need to update your copy to maintain full compatibility. Use Child Themes: Always apply overrides within a child theme rather than a parent theme. This prevents your customizations from being lost during theme updates. Advanced Developer Resources For developers who require deeper customization than standard template overrides can offer, consider leveraging custom action hooks provided throughout the plugin’s architecture. For instance, you can modify elements of the The Advantages and Disadvantages of Developing a Custom WordPress Theme by using standard WordPress filters to inject content or modify data arrays before they are rendered to the screen. // Example: Use this structure to maintain your templates // wp-content/themes/your-theme/eazylms/eazydocs/single-docs.php Tagged:CustomizationDevelopmentTemplate Template Overrides - PreviousWorking with REST API