Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created October 8, 2018 08:26
Show Gist options
  • Select an option

  • Save yousufansa/17d62791b4acbbd9615f59199df3be23 to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/17d62791b4acbbd9615f59199df3be23 to your computer and use it in GitHub Desktop.
Jobhunt - Display Resume Custom Field Example
add_filter( 'jobhunt_single_candidate_overview_details', 'jobhunt_child_single_candidate_overview_details' );
if( ! function_exists( 'jobhunt_child_single_candidate_overview_details' ) ) {
function jobhunt_child_single_candidate_overview_details( $args ) {
$args['candidate_phone'] = array(
'icon' => 'la la-phone',
'label' => esc_html__( 'Phone', 'jobhunt' ),
'callback' => 'jobhunt_child_single_candidate_overview_candidate_phone',
);
return $args;
}
}
if( ! function_exists( 'jobhunt_child_single_candidate_overview_candidate_phone' ) ) {
function jobhunt_child_single_candidate_overview_candidate_phone() {
$post = get_post();
if ( ! $post || 'resume' !== $post->post_type ) {
return;
}
echo isset( $post->_candidate_phone ) ? $post->_candidate_phone : '';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment