Yep; 2 ways.
1) Use this filter to change the values via your own function: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php#L92 This may help http://wp.tutsplus.com/tutorials/the-beginners-guide-to-wordpress-actions-and-filters/
2) Make an en_US or en_GB translation and translate the values. codestyling localisation is the plugin you’ll need for this.
Thank you very much for your speedy answer.
So I tried this but to no avail. I am a total noob at coding so forgive me if the mistake is stupidly simple.
function name_field( $title ) {
$title .= "Contact Name";
return $title;
}
add_filter('job_title','name_field' );
What am I doing wrong?
Thanks again
This is such a fantastic plugin – I’m experiencing something similar, although I couldn’t get your code to work in my functions.php file.
I’m using your plugin for a single organization, so I’d like to hardcode the logo, tagline, website, etc, so that you wouldn’t need to manually update it each time you want to post a new listing.
How could I make this modification? Seriously, this is such great work.
@logani use the same filter as above to remove the fields, then to actually save hardcoded data to each created job post this action is suitable: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php#L452
If you are logged in however, you’ll only need to fill out those fields once – the form remembers them!
I used this solution,
2) Make an en_US or en_GB translation and translate the values. codestyling localisation is the plugin you’ll need for this.
and it worked like a charm.
The only problem is upon updating the plugin (I am assuming this is whne it happened) the translation disappears.
Is there a way to get around this?
Thank you in advance
appreciate your feedback, Mike – I really want to make this work. Sorry you need to hold my hand on this. I’m a little lost – am I supposed to:
1) modify lines 92-180 in class-wp-job-manager-form-submit-job.php to my hardcoded values
2) add the filter
add_filter( ‘submit_job_form_fields’, ‘your_function’ );
-and the function-
function your_function( $fields ) {
$fields = [‘job’][‘job_title’][‘label’] = “Contact Name”;
return $fields;
}
to my functions.php file
3) add this action to my functions.php file
do_action( ‘job_manager_update_job_data’, self::$job_id, $values );
I seem to get a syntax error whenever I try to add this function:
function your_function( $fields ) {
$fields = [‘job’][‘job_title’][‘label’] = “Contact Name”;
return $fields;
}
I know I’m way over my head here – but could you clarify your instructions please? As far as the localization plugin solution, I was able to translate labels, but not the submitted values.
Thanks again!
Don’t edit core files – use filters only (in your functions.php).
I also wouldn’t use ‘your_function’.
Use custom_ job_manager_update_job_data,
add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' );
function custom_submit_job_form_fields( $fields ) {
$fields['job']['job_title']['label'] = "Contact Name";
return $fields;
}
Something like that.
If you get stuck perhaps you may want to consider putting a job on codeable/tweaky – just to get some dev help.