Modifying template files

Certain areas of AffiliateWP use template files. You can freely modify these template files from your child theme, and in doing so, your modifications will not be lost when the plugin is updated.

Templates that can be modified

  • emails
    The email template folder includes the following template files: 

    body-default.php – Email body
    footer-default.php – Email footer
    header-default.php – Email header
  • creative.php
    The Creatives admin area
  • dashboard.php
    The affiliate dashboard
  • dashboard-tab-urls.php
    The URLs tab of the affiliate dashboard
  • dashboard-tab-stats.php
    The Stats tab of the affiliate dashboard
  • dashboard-tab-graphs.php
    The Graphs tab of the affiliate dashboard
  • dashboard-tab-referrals.php
    The Referrals tab of the affiliate dashboard
  • dashboard-tab-payouts.php
    The Payouts tab of the affiliate dashboard
  • dashboard-tab-visits.php
    The Visits tab of the affiliate dashboard
  • dashboard-tab-creatives.php
    The Creatives tab of the affiliate dashboard
  • dashboard-tab-settings.php
    The Settings tab of the affiliate dashboard
  • login.php
    The affiliate login form
  • no-access.php
    The text that is shown when the user has no access
  • register.php
    The affiliate registration form

How to modify the templates

  1. Find the template you’d like to edit from the plugin’s template folder.
  2. Make a folder in your child theme (if it’s not there already) called affiliatewp and copy the template from the plugin into it. 
  3. Modify the template file to your liking and upload the new folder, along with the template files inside it, to your website.

When editing the email templates, please ensure that you add your template files to the affiliatewp/emails folder.

A quick note on child themes

You may have noticed that we suggest placing these template files inside your
child theme. This is because if you are using a theme which is updated regularly by the theme’s developer, you will lose the newly created affiliatewp folder, along with all the templates inside.

Always use a child theme when making any modifications to your theme. More information about child themes, and how to create one can be found at
https://codex.wordpress.org/Child_Themes