The template-based dashboard and its dashboard sections are easy to customize. Individual template files for the dashboard and each of its sections allow for rapid customizations.

The templates are used when the dashboard or any of its sections are rendered via the built-in facilities:

The system provides template files that contain the markup and template structures that are used to render the front-end dashboard and its individual dashboard sections.

The default template files are provided within the plugin’s affiliates-pro/templates/dashboard directory and contain the following files:

  • dashboard.php – renders the dashboard with all its sections
  • login.php – renders the login form
  • registration.php – renders the registration form
  • profile.php – renders the profile form
  • overview.php – renders the overview with the graphs and the link tool (this template is not used with this version, use overview-pro.php instead)
  • overview-pro.php – renders the enhanced overview with the graphs and the link tool
  • earnings.php – renders the periodic earnings section
  • earnings-entry.php – renders individual entries in the earnings section
  • referrals.php – renders the referrals section
  • referrals-entry.php – renders individual entries in the referrals section
  • traffic.php – renders the traffic section
  • traffic-entry.php – renders individual entries in the traffic section
  • banners.php – renders the banners section

To customize these templates, copy them to a directory within your theme named affiliates. For example, assuming that your active theme is located in wp-content/themes/mytheme and you want to customize the Login and the Overview section, you would add the following files within your theme:

  • wp-content/themes/mytheme/affiliates/dashboard/login.php
  • wp-content/themes/mytheme/affiliates/dashboard/overview.php

Important – Do not edit the files directly within the plugin itself, as once you update the plugin, all your changes will be overwritten. Also, if you are not yet using a child theme, you should create one and add those files there.

If you are working with Affiliates Enterprise, there are additional template files and there are more advanced versions of the template files. We recommend to refer to the related documentation section of that version instead.

Context Variables

  • Affiliates_Dashboard $dashboard this object is available for use within the dashboard.php template
  • mixed $section the section object is available for use within its corresponding section template and provides details that can be used in the template

Please refer to the included template files for details on these variables and their usage.

Dashboard Composition

The composition of the dashboard in a given context determines which sections are shown when the dashboard is rendered. They can be altered using the affiliates_dashboard_setup_sections filter.