Created
January 22, 2015 17:05
-
-
Save mikejolley/5b0a42255e968353a752 to your computer and use it in GitHub Desktop.
Output Job Categories on Job Listings
This file contains 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
<?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