Template overrides

Note: All code examples on this site are provided for developer reference/guidance only and we cannot guarantee that they will always work as expected. Our support policy does not include assistance with modifying or debugging code from any code examples, and they may be changed or removed if we find they no longer work due to changes in our plugins.

Within the plugin folder there is a ‘templates’ directory where frontend views are stored. This includes, for example, the job form and form fields. These templates get loaded by WP Job Manager when it needs to display content:

  • account-signin.php
  • job-application.php
  • content-job_listing.php
  • content-no-jobs-found.php
  • content-single-job_listing.php
  • content-single-job_listing-company.php
  • content-single-job_listing-meta.php
  • content-summary-job_listing.php
  • content-widget-job_listing.php
  • content-widget-no-jobs-found.php
  • job-application-email.php
  • job-application-url.php
  • job-dashboard.php
  • job-dashboard-login.php
  • job-filters.php
  • job-filter-job-types.php
  • job-listings-end.php
  • job-listings-start.php
  • job-pagination.php
  • job-preview.php
  • job-submit.php
  • job-submitted.php
  • pagination.php

In the Form Fields subdirectory (../templates/form-fields), the templates are:

  • checkbox-field.php
  • date-field.php
  • file-field.php
  • multiselect-field.php
  • term-checklist-field.php
  • password-field.php
  • radio-field.php
  • recaptcha-field.php
  • select-field.php
  • term-multiselect-field.php
  • term-select-field.php
  • text-field.php
  • textarea-field.php
  • uploaded-file-html.php
  • wp-editor-field.php

In the Emails subdirectory (../templates/emails), the templates are:

  • admin-expiring-job.php
  • admin-new-job.php
  • admin-updated-job.php
  • employer-expiring-job.php
  • email-footer.php plain
  • email-header.php
  • email-job-details.php
  • email-styles.php

Overriding templates via a theme

Template files can be overridden via your theme should you wish to customise them. To override a template, move it to yourtheme/job_manager/, keeping the path within ‘templates’ intact.

Template override example

For example, if I wanted to override `job_filters.php`I would copy it to mytheme/job_manager/job-filters.php and edit my theme’s version.

Please note, if these files are updated in the core plugin, you may need to update your custom version in the future to maintain compatibility. Therefore it is advised to only override the template files you need to customise.

Overriding templates through code

Plugin developers can also override templates by filtering the ‘job_manager_locate_template’ filter.

return apply_filters( 'job_manager_locate_template', $template, $template_name, $template_path );

Returning your own template path will override all others.

To override the template files of our various add-ons, see this document.

Themes Documentation