Skip to content

Instantly share code, notes, and snippets.

@bryceadams
Last active August 29, 2015 14:14
Show Gist options
  • Save bryceadams/880c1d6dc108b81e4bb4 to your computer and use it in GitHub Desktop.
Save bryceadams/880c1d6dc108b81e4bb4 to your computer and use it in GitHub Desktop.
add_filter( 'submit_resume_form_save_resume_data', 'custom_submit_resume_form_save_resume_data', 10, 5 );
function custom_submit_resume_form_save_resume_data( $data, $post_title, $post_content, $status, $values ) {
$term = get_term( $values['resume_fields']['resume_category'][0], 'resume_category' );
$data['post_name'] = sanitize_title( $term->name );
// This line appends the location of the user
$data['post_name'] .= '-' . sanitize_title( $values['resume_fields']['candidate_location'] );
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment