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 sectionslogin.php
– renders the login formregistration.php
– renders the registration formprofile.php
– renders the profile formoverview.php
– renders the overview with the graphs and the link tool (this template is not used with this version, useoverview-pro.php
instead)overview-pro.php
– renders the enhanced overview with the graphs and the link toolearnings.php
– renders the periodic earnings sectionearnings-entry.php
– renders individual entries in the earnings sectionreferrals.php
– renders the referrals sectionreferrals-entry.php
– renders individual entries in the referrals sectiontraffic.php
– renders the traffic sectiontraffic-entry.php
– renders individual entries in the traffic sectionbanners.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 thedashboard.php
templatemixed
$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.