Skip to content

Instantly share code, notes, and snippets.

@nilofer-farzana
Last active November 15, 2022 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilofer-farzana/c808ec0c9a64861167f178f8722fa903 to your computer and use it in GitHub Desktop.
Save nilofer-farzana/c808ec0c9a64861167f178f8722fa903 to your computer and use it in GitHub Desktop.
if ( ! function_exists( 'get_the_company_job_listing' ) ) {
function get_the_company_job_listing( $post = null ) {
if( ! is_object( $post ) ) {
$post = get_post( $post );
}
return get_posts( array(
'post_type' => 'job_listing',
'meta_key' => '_company_id',
'meta_value' => $post->ID,
'posts_per_page' => 10,
'paging' => true
) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment