joycetan26 Posted May 22, 2015 Share Posted May 22, 2015 Hi, I created a custom field in Wordpress. I added a multi-selection field. It is working fine. This is the code: add_filter( 'submit_resume_form_fields', 'wpjms_frontend_candidate_availability_fields' ); function wpjms_frontend_candidate_availability_fields( $fields ) { $fields['resume_fields']['candidate_availability'] = array( 'label' => __( 'Availability', 'job_manager' ), 'type' => 'multiselect', 'options' => array( 'Early Morning (6am-9am)' => 'Early Morning (6am-9am)', 'Late Morning (9am-12pm)' => 'Late Morning (9am-12pm)', 'Early Afternoon (12-pm-3pm)' => 'Early Afternoon (12-pm-3pm)', 'Late Afternoon (3pm-6pm)' => 'Late Afternoon (3pm-6pm)', 'Early Evening (6pm-9pm)' => 'Early Evening (6pm-9pm)', 'Late Evening (9pm-12am)' => 'Late Evening (9pm-12am)', 'Overnight (12am-6am)' => 'Overnight (12am-6am)', 'Weekday' => 'Weekday', 'Weekend' => 'Weekend', ), 'priority' => 27 ); return $fields; } However, I have a problem displaying it in the page. This is the code I thought would work but it didn't: <div class="candidate_availability"> <h4><?php _e( 'Availability'); ?></h4> <?php echo get_post_meta( $post->ID, '_candidate_availability', true ); ?> </div> Hope someone can help me out. Thank you very much. Quote Link to comment Share on other sites More sharing options...
Solution joycetan26 Posted May 22, 2015 Author Solution Share Posted May 22, 2015 Hi guys, I got this sorted out! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.