Created
October 20, 2018 14:38
-
-
Save yousufansa/2746509df97f5e115fc10c621b37916a to your computer and use it in GitHub Desktop.
Jobhunt - Display Job Category & Job Region in Jobs Listing
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
add_action( 'jobhunt_job_listing_title', 'jobhunt_template_job_listing_category', 65 ); | |
add_action( 'jobhunt_job_listing_title', 'jobhunt_template_job_listing_region', 65 ); | |
if ( ! function_exists( 'jobhunt_template_job_listing_region' ) ) { | |
function jobhunt_template_job_listing_region() { | |
global $post; | |
$post = get_post( $post ); | |
echo '<div class="job-listing-region-custom">' . jobhunt_get_wpjm_taxomony_data( $post, 'job_listing_region', false ) . '</div>'; | |
?><style> | |
.job-listing-region-custom ul{ | |
list-style-type: none; | |
padding-left: 0; | |
} | |
.job-listing-region-custom ul li{ | |
display: inline-block; | |
width: auto; | |
} | |
.job-listing-region-custom ul li+li:before{ | |
content: ', '; | |
} | |
</style><?php | |
} | |
} | |
if ( ! function_exists( 'jobhunt_template_job_listing_category' ) ) { | |
function jobhunt_template_job_listing_category() { | |
global $post; | |
$post = get_post( $post ); | |
echo '<div class="job-listing-category-custom">' . jobhunt_get_wpjm_taxomony_data( $post, 'job_listing_category', false ) . '</div>'; | |
?><style> | |
.job-listing-category-custom ul{ | |
list-style-type: none; | |
padding-left: 0; | |
} | |
.job-listing-category-custom ul li{ | |
display: inline-block; | |
width: auto; | |
} | |
.job-listing-category-custom ul li+li:before{ | |
content: ', '; | |
} | |
</style><?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment