Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
farookibrahim / functions.php
Created April 21, 2020 05:11
Jobhunt - Add Job Salary In Job Listing
if ( ! function_exists( 'jh_child_job_listing_job_salary' ) ) {
function jh_child_job_listing_job_salary() {
global $post;
$post = get_post( $post );
if ( ( $salary = wp_get_object_terms( $post->ID, 'job_listing_salary', array( 'fields' => 'names' ) ) ) && is_array( $salary ) ) {
echo '<div class="job-listing_single_job__salary">' . jobhunt_get_wpjm_taxomony_data( $post, 'job_listing_salary', false ) . '</div>';
}
}
}
add_action( 'jobhunt_job_listing_meta', 'jh_child_job_listing_job_salary', 20 );