Overriding Templates

Note: This feature has been deprecated and will be completely removed in version 5.0.0.

If you are already overridding templates using this tutorial, use actions and filters instead or contact support for assistance.

The template files used by the plugin are located in the templates directory in the root folder of the plugin. Every one of these templates can be overridden by copying it to your theme and changing its content, the same way WooCommerce templates are overridden by copying them to your theme.

If you are a developer, instead of overriding the template this way you can use available action and filter hooks to modify its content. In the case you would need to look into the plugin code to find the suitable hooks.

Here we would simply discuss how to override templates by copying their files to your theme.

Overriding templates directly by copying their files to your theme

Firstly, in your theme’s root directory create a folder named nm-gift-registry-lite (if using the lite version) or nm-gift-registry (if using the full version).

Secondly, copy the template files you want to edit from the plugin’s templates directory to the new plugin’s folder you created in your theme. If the template file is in a sub-directory of the plugin’s templates directory you should also copy the sub-directory with it. For example to override the wishlist profile template, copy wp-content/plugins/nm-gift-registry/templates/account/profile.php to wp-content/themes/[your-theme-folder]/nm-gift-registry/account/profile.php.

Now you can edit the profile.php file in your theme directory and it’s contents would override the contents of the plugin’s own profile.php when the profile template is displayed.