Last active
November 21, 2018 16:12
-
-
Save yousufansa/cfccfe41b97f90dd56c2e4cad96c52e4 to your computer and use it in GitHub Desktop.
Jobhunt - Add Job Salary In Job Listing Instead of Job Type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); | |
if ( ! function_exists( 'jh_child_custom_job_listing_meta' ) ) { | |
function jh_child_custom_job_listing_meta() { | |
remove_action( 'jobhunt_job_listing_meta', 'jobhunt_job_listing_job_type', 20 ); | |
} | |
} | |
add_action( 'init', 'jh_child_custom_job_listing_meta' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.job-listing-meta .job-listing_single_job__salary > ul { | |
list-style-type: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment