Skip to content

Instantly share code, notes, and snippets.

@turtlepod

turtlepod/functions.php

Last active Nov 14, 2017
Embed
What would you like to do?
Listify Snippet: Change Location Field to Address
<?php
/**
* Change The Location Fields to "Address"
*
* @link https://gist.github.com/turtlepod/e05053729577fdbf2daa604bb32271b7
*/
add_action( 'init', function() {
// Filter/modify submit form fields.
add_filter( 'submit_job_form_fields', function( $fields ) {
// Check if job location fields is set.
if ( isset( $fields['job']['job_location'] ) ) {
// Change the label.
$fields['job']['job_location']['label'] = 'Address';
// Change description text.
$fields['job']['job_location']['description'] = 'Add your address here.';
// Change the placeholder text.
$fields['job']['job_location']['placeholder'] = 'Type your address here.';
}
return $fields;
}, 99 );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment