Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created April 20, 2020 12:13
Show Gist options
  • Save yousufansa/29fdc9c1f7a2db49b70ad0d3e41e9729 to your computer and use it in GitHub Desktop.
Save yousufansa/29fdc9c1f7a2db49b70ad0d3e41e9729 to your computer and use it in GitHub Desktop.
Jobhunt - Display Job Category on Job Listings
if ( ! function_exists( 'jh_child_template_job_listing_category' ) ) {
function jh_child_template_job_listing_category() {
global $post;
$post = get_post( $post );
echo '<div class="job-listing-loop-category">' . jobhunt_get_wpjm_taxomony_data( $post, 'job_listing_category', false ) . '</div>';
}
}
add_action( 'jobhunt_job_listing_title', 'jh_child_template_job_listing_category', 65 );
.job-listing-loop-category ul{
list-style-type: none;
padding-left: 0;
}
.job-listing-loop-category ul li{
display: inline-block;
width: auto;
}
.job-listing-loop-category ul li+li:before{
content: ', ';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment