How to edit template files

Easy Content Upgrades has a number of templates that can be overridden and customized in child themes. The templates can be seen in wp-content/plugins/easy-content-upgrades/templates/. Here’s a list of template files:

  • content-upgrade.php – The default content upgrade form template. This is used in the [content-upgrade] shortcode.
  • content-upgrade-popup.php – The template used for popup content upgrades. This is used instead of the above when a content upgrade is configured as a popup.
  • customizer-content-upgrade.php – The Customizer preview page for content upgrades (used in the designer).
  • email.php – Email template used when sending out content upgrades and confirmation emails.
  • resource-library.php – Underscore.js template for showing a grid of content upgrades in the resource library.
  • resource-library-form.php – The form displayed to users who don’t yet have access to the resource library.

To override one of these templates, you first want to make sure you have a child theme (unless you’re using a custom theme – then you don’t necessarily need one). Then follow these steps:

  1. Create a new folder in your child theme called easy-content-upgrades
  2. Copy the template file you want to edit from the easy-content-upgrades/templates/ folder into your newly created folder in your child theme.
  3. Then you can edit the template however you like and you won’t lose your changes when updating the plugin.

How can we help?