$job->emmet_jobs_contact = $custom['emmet_jobs_contact'][0];
$job->emmet_jobs_phone = $custom['emmet_jobs_phone'][0];
$job->emmet_jobs_email = $custom['emmet_jobs_email'][0];
-
- $cats = wp_get_post_terms($job->ID, EMMET_EMP_TAX_DEPARTMENTS, array('fields' => 'names'));
+
+ $cats = wp_get_post_terms($job->ID, EMMET_EMP_TAX_DEPARTMENTS, array('fields' => 'names'));
$terms = wp_get_post_terms($job->ID, EMMET_EMP_TAX_CATEGORIES, array('fields' => 'names'));
-
+
$job->terms = $terms;
$job->cats = $cats;
-
+
+ $current_url = esc_url(add_query_arg($wp->query_string, '', home_url($wp->request)));
+ $applyOnlineHref = $current_url
+ . ((strpos($current_url, '?')) ? '&' : '?')
+ . self::FORM_VAR . "=1&job=" . $job->ID;
include $this->frontViewDir . '/jobDetail.php';
return;
}
<div><strong>Email: </strong><a href="mailto: <?php echo $job->emmet_jobs_email; ?>"><?php echo $job->emmet_jobs_email; ?></a></div>
<?php endif;?>
- <a target="_blank" href="<?php echo get_template_directory_uri();?>/assets/employment-form.pdf">Employment Application</a>
+ <a target="_blank" href="<?php echo get_template_directory_uri();?>/assets/employment-form.pdf">Employment Application</a><br>
+ <a href="<?php echo $applyOnlineHref;?>">Apply Online</a>