Skip to content

Instantly share code, notes, and snippets.

@imfaisalkh
Last active June 13, 2019 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imfaisalkh/5a908f74e9cadcdfb4ff8d6b14ff441e to your computer and use it in GitHub Desktop.
Save imfaisalkh/5a908f74e9cadcdfb4ff8d6b14ff441e to your computer and use it in GitHub Desktop.
Capstone - Modify "Salary" Options
#-------------------------------------------------------------------------------#
# Capstone - Modify "Salary" Options
#-------------------------------------------------------------------------------#
// Remove Existing "Salary" Options
function remove_default_salary_output() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_salary_field' );
}
add_action( 'init', 'remove_default_salary_output' );
// Add New "Salary" Options
function capstone_salary_args( $args ) {
// MODIFY THESE OPTIONS HERE
$args = array(
'',
'$10,000 - $20,000' => '$10,000 - $20,000',
'$20,000 - $30,000' => '$20,000 - $30,000',
'$30,000 - $40,000' => '$30,000 - $40,000',
'$50,000 - $60,000' => '$50,000 - $60,000',
'$60,000 - $70,000' => '$60,000 - $70,000',
'$70,000 - $80,000' => '$70,000 - $80,000',
'$80,000 - $90,000' => '$80,000 - $90,000',
'$90,000 - $100,000' => '$90,000 - $100,000',
'$100000+' => '$100,000 - Higher'
);
return $args;
}
add_filter( 'capstone_job_salary_options', 'capstone_salary_args' );
@imfaisalkh
Copy link
Author

Paste this code in capstone child theme's functions.php file or use the plugin "Code Snippets" (https://wordpress.org/plugins/code-snippets/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment