Template structure & Overriding templates via a theme

Plugin template files contain the markup and template structure to be rendered on your store front-end

When you open these files, you will notice they all contain hooks that allow you to add/move content without needing to edit template files themselves. This method protects against upgrade issues, as the template files can be left completely untouched.

Template files can be found within the /templates/ directory of each of most of our plugins.

How to Edit Files

Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme. The directory name needs to be the actual slug of the plugin. To find out the slug of a specific plugin, simply take a look at the System Status tab within the XT Plugins menu. For example, the directory name for XT Woo Floating Cart plugin would be /xt-woo-floating-cart 

Copy the template while keeping the same file structure but removing the /templates/ subdirectory.

Example: To override the the floating cart header template: 

Copy: wp-content/plugins/xt-woo-floating-cart/templates/parts/cart/header.php 
To: wp-content/themes/yourtheme/xt-woo-floating-cart/parts/cart/header.php

The copied file will now override the plugin default template file.

Warning: Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost. For more detailed information, see Fixing Outdated Plugin Templates.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us