Created
April 20, 2020 08:18
-
-
Save yousufansa/46e5f7c563ac7600f9bef583dd28718f to your computer and use it in GitHub Desktop.
MAS WPJMC - Companies Posted Jobs in Single Company
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
if( ! function_exists( 'mas_wpjmc_single_company_job_listings' ) ) { | |
function mas_wpjmc_single_company_job_listings() { | |
global $post; | |
$company_jobs = mas_wpjmc_get_the_company_job_listing(); | |
if( count( $company_jobs ) ) : | |
?><div class="mas-company-jobs"><?php | |
?><h3 class="mas-company-jobs__title"><?php | |
echo apply_filters( 'mas_wpjmc_company_jobs_title', esc_html__( 'Jobs by This Company', 'mas-wp-job-manager-company' ) ); | |
?></h3><?php | |
get_job_manager_template( 'job-listings-start.php' ); | |
foreach( $company_jobs as $post ) : | |
setup_postdata($post); | |
do_action( 'job_listing_loop' ); | |
get_job_manager_template_part( 'content-job_listing' ); | |
endforeach; // End of the loop. | |
wp_reset_postdata(); | |
get_job_manager_template( 'job-listings-end.php' ); | |
?></div><?php | |
endif; | |
} | |
} | |
add_action( 'single_company', 'mas_wpjmc_single_company_job_listings', 50 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment