Autoload and Override Default PDF Template Files

As of Entry Automation 3.2.3, you can now automatically override the default PDF template files used when exporting to a PDF file using files located in your active theme or child theme.

The Template Files

Entry Automation by default uses the following three templates files for each component of the PDF:

How To Override Them

Entry Automation will look for files to load the PDF template files listed above in a few places if they exist in a cascading fashion.

  1. An active child theme: {stylesheet_directory}/forgravity-entryautomation/templates
  2. An active parent or standard theme: {template_directory}/forgravity-entryautomation/templates
  3. The default files from the plugin: wp-content/plugins/forgravity-entryautomation/includes/templates

When Entry Automation checks each directory listed above, it will look for files in a similar cascading order:

  1. A component template with a form and task ID specified in the file name: e.g. export-pdf-header-12-22.php
  2. A component template with a form ID specified in the file name: e.g. export-pdf-header-12.php
  3. A component template with no form or task ID specified in the file name: e.g. export-pdf-header.php

As an example, if you wanted to override the header component template file across all forms within your active child theme you would create a new directory within that child theme named forgravity-entryautomation, create a templates subdirectory within that directory, and add a file named export-pdf-header.php with your custom markup.