Modifying Resumes List Table Columns

Job board templating engine was designed to allow easily modify resume and job board layout, most common request is to change columns that are displayed on the default resumes list. This is possible to do but only in resumes templates.

Before going any further please read Introduction to templates article, it explains how to properly modify WPJB templates so you can easily upgrade plugin in future.

Two files are responsible for displaying resumes list:

  • /wpjobboard/templates/resumes/index.php – contains resumes list table scheme (columns and headers), if you will be adding or deleting column you will want to modify this file
  • /wpjobboard/templates/resumes/index-item.php – this file is used “inside” index.php template it contains actual table rows, that is information about selected resume.

Inside the index-item.php template file you have access to Wpjb_Model_Job object. This object public properties and methods you can use are described in Wpjb_Model_Resume class reference article.

Usage examples

Displaying company logo before job title. In the index-item.php find line <td> and after it add

<?php if($resume->getAvatarUrl()): ?>
<img src=<?php esc_attr_e($resume->getAvatarUrl()) ?> alt="" />
<?php endif; ?>

Displaying headline excerpt (first 250 characters of description without HTML), open index-item.php and in a place where you want to display excerpt add

<?php esc_html_e(substr(strip_tags($resume->headline), 250)) ?>

Displaying salary Custom Field (assuming you earlier added such custom field)

<?php esc_html_e($resume->meta->salary->value()) ?>

Leave a Reply

Your email address will not be published. Required fields are marked *