Skip to content

Instantly share code, notes, and snippets.

@wpmark wpmark/wpjmbb-salary-field.php Secret
Last active Mar 11, 2016

What would you like to do?
Add Salary Field to WP Job Manager Broadbean Add-on
* function wpjmbb_add_extra_fields
* adds an additional salary field to included in the
* wp job manager broadbean add-on plugin
* @params array $fields is the current array of fields to include in the XML
* @return array $fields is the newly modified array of fields
function wpjmbb_add_extra_fields( $fields ) {
* always start your fields with an underscore
* this is removed in the XML and therefore this field would be sent
* in the XML with the node <my_salary>
$fields[ '_my_salary' ] = array(
'label' => 'Salary', // identifies the field in the admin
'placeholder' => 'e.g. £24000 / year', // placeholder text for the admin interface
return $fields;
add_filter( 'wpjmbb_fields', 'wpjmbb_add_extra_fields' );
/* only needed if you want to manaually add this to the job edit screen in the wp admin */
add_filter( 'job_manager_job_listing_data_fields', 'wpjmbb_add_extra_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.