Skip to content

Instantly share code, notes, and snippets.

@dexit
Forked from yousufansa/functions.php
Created December 16, 2024 16:32
Show Gist options
  • Save dexit/1bae6df9746864f3fe5897d7237a471b to your computer and use it in GitHub Desktop.
Save dexit/1bae6df9746864f3fe5897d7237a471b 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