Skip to content

Instantly share code, notes, and snippets.

@turtlepod
Last active November 14, 2017 08:16
Show Gist options
  • Save turtlepod/e05053729577fdbf2daa604bb32271b7 to your computer and use it in GitHub Desktop.
Save turtlepod/e05053729577fdbf2daa604bb32271b7 to your computer and use it in GitHub Desktop.
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