Last active
February 12, 2020 10:55
-
-
Save mikejolley/bcb1d47f50aea6f2c0d9 to your computer and use it in GitHub Desktop.
WP Job Manager - Make Job Location a required field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'submit_job_form_fields', 'make_location_field_required' ); | |
function make_location_field_required( $fields ) { | |
$fields['job']['job_location']['required'] = true; | |
return $fields; | |
} |
Just what I was looking for, thanks for the gist!
To whoever, wondering where to put this code:
While you can add it directly to your theme's functions.php
file, I'd personally recommend to install Code Snippets: https://wordpress.org/plugins/code-snippets/ and add the piece of code there.
Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, could you please tell me, where to put this? Functions.php? Thank you in advance for an answer! Best