Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created January 22, 2015 17:05
Show Gist options
  • Save mikejolley/5b0a42255e968353a752 to your computer and use it in GitHub Desktop.
Save mikejolley/5b0a42255e968353a752 to your computer and use it in GitHub Desktop.
Output Job Categories on Job Listings
<?php
// Add category to single job listing meta
add_action( 'single_job_listing_meta_end', 'output_job_category' );
// And to job list
add_action( 'job_listing_meta_end', 'output_job_category' );
function output_job_category() {
global $post;
echo '<li class="job-category">' . strip_tags( get_the_term_list( $post->ID, 'job_listing_category', '', ', ' ) ) . '</li>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment