View gist:b2b55d5682b48b6e892d
1 2 3 4 5 6 7 8 9 10
<?php
$realisations = get_custom_field( 'candidate_realisation' );
if( ! empty( $realisations ) ){
foreach( $realisations as $realisation ){
echo '<img src="' . $realisation . '" class="_candidate_realisation" />';
}
}
?>
View foreach.php
1 2 3 4 5 6 7 8 9 10
// Start UL (Unordered List)
echo "<ul>";
// Get the field value
$amenities = get_custom_field( 'job_amentities' );
// Make sure there is a value
if( ! empty( $amentities ) ){
// An Array would be multiple selections
View gist:83777e99b03b77baa499
1 2 3 4 5 6 7 8
<?php
$categories = get_the_terms( get_the_ID(), 'job_listing_category' );
foreach ( $categories as $category ){
echo $category->name;
}
?>
View gist:41405633a920cb1dc379
1 2 3 4 5 6
<?php
$date = "15-01-28";
$timestamp = strtotime( $date );
// See http://php.net/manual/en/function.date.php for available formats
echo date( "F j, Y", $timestamp );
?>
View content-single-job_listing.php
1 2 3 4 5 6 7 8 9 10
<div class="single_job_listing" itemscope itemtype="http://schema.org/JobPosting">
<meta itemprop="title" content="<?php echo esc_attr( $post->post_title ); ?>" />
<?php if ( $post->post_status == 'expired' ) : ?>
 
<div class="job-manager-info"><?php _e( 'This listing has expired', 'wp-job-manager' ); ?></div>
 
<?php else : ?>
 
<?php
View gist:a2a63987389a1767958f
1 2 3 4 5 6 7 8
// Change job_listing_meta_end to job_listing_meta_start to output at start
add_action( 'job_listing_meta_end', 'add_salary_to_job_listing' );
function add_salary_to_job_listing(){
// Assuming the meta key is job_salary
$field_value = get_job_field( 'job_salary' );
echo "<li>Salary: " . $field_value . "</li>";
}
View gist:12fffc123b9503355b7b
1 2 3 4 5 6 7 8 9 10
// Get the custom field taxonomy selected term ID's
$field_value = get_custom_field("outsourcing_partial_type");
if ( is_array( $field_value ) ) {
foreach ( $field_value as $selected_value ) {
$tax = get_term_by( 'id', (int) $selected_value, "outsourcing_partial_type" );
// Set the name of the taxonomy an an item in a new array
$tax_labels[] = $tax->name;
// Or you could just output it in this for loop
View gist:878b4af974731e700b55
1 2 3 4 5 6 7 8 9 10
// Add your own function to filter the fields
add_filter( 'submit_resume_form_fields', 'custom_submit_resume_form_fields' );
// This is your function which takes the fields, modifies them, and returns them
// You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php
function custom_submit_resume_form_fields( $fields ) {
// Here we target one of the job fields (job_title) and change it's label
$fields['resume_fields']['candidate_experience']['employer']['label'] = "Organization/Employer";
View array_column_recursive.php
1 2 3 4 5 6 7 8 9 10
if ( ! function_exists( 'array_column_recursive' ) ) {
/**
* Returns the values recursively from columns of the input array, identified by
* the $columnKey.
*
* Optionally, you may provide an $indexKey to index the values in the returned
* array by the values from the $indexKey column in the input array.
*
* @param array $input A multi-dimensional array (record set) from which to pull
* a column of values.
Something went wrong with that request. Please try again.