This is a guide for advanced users.
Custom report template in the theme's folder#
Before editing the template, check whether you can make the required changes in Invoices → Reports. To add, remove, or reorder report columns, use the Available columns and Active columns settings.
If you want to edit the HTML report template follow these steps:
1. Copy the file from the plugin directory:
/wp-content/plugins/flexible-invoices-reports/templates/html-report.php to your theme directory:
/wp-content/themes/[your-theme]/flexible-invoices-reports/html-report.php
Replace [your-theme] with the directory name of your active theme. If the flexible-invoices-reports folder does not exist inside that directory, create it first. Keep the file name html-report.php unchanged.
2. From now on, the file in the theme directory will overwrite the original file from the plugin directory.
3. Modify the file according to your needs, e.g. changing the texts, adding or deleting certain pieces of information. You may also adjust the layout of such an HTML report.
4. You may need to add the report template again when you update or change an active theme.
If you want to undo the changes, simply delete the file from the theme directory. The file from the plugin directory will be in use again and all the modifications will be undone.
Check your changes
- Go to Invoices → Reports.
- Select the HTML report format and generate a new report.
- Check that your changes appear correctly, column headings match the displayed data, and totals are displayed correctly.
- If you plan to print the report, check the print preview as well.
