Here is the code I used to add an image to each listing in job manager if it’s any help for you. Add to your theme’s functions.php file.
/* Add image to listing */
add_filter( ‘submit_job_form_fields’, ‘frontend_add_featured_image’ );
function frontend_add_featured_image( $fields ) {
$fields[‘job’][‘job_image’] = array(
‘label’ => __( ‘Image’, ‘job_manager’ ),
‘type’ => ‘file’,
‘required’ => true,
‘placeholder’ => ”,
‘priority’ => 7
);
return $fields;
}
/* Save input */
add_action( ‘job_manager_update_job_data’, ‘frontend_add_featured_image_save’, 10, 2 );
function frontend_add_featured_image_save( $job_id, $values ) {
update_post_meta( $job_id, ‘_job_image’, $values[‘job’][‘job_image’] );
}
/* Add Custom Field to WP Admin Section */
add_filter( ‘job_manager_job_listing_data_fields’, ‘admin_add_job_image_field’ );
function admin_add_job_image_field( $fields ) {
$fields[‘_job_image’] = array(
‘label’ => __( ‘Image’, ‘job_manager’ ),
‘type’ => ‘file’,
‘placeholder’ => ”,
‘description’ => ”
);
return $fields;
}
And then just add this wherever you want to display the image:
<img src=”<?php echo $post->_job_image; ?>” alt=””>