Created
October 8, 2018 08:26
-
-
Save yousufansa/17d62791b4acbbd9615f59199df3be23 to your computer and use it in GitHub Desktop.
Jobhunt - Display Resume Custom Field Example
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_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