Skip to content

Custom Resume Fields

Add custom fields to the Resume Builder + Quick Resume Form using the same declarative filter pattern as Free’s wcb_job_form_fields. A field added once renders on both forms.

The filter receives two arguments - the field groups (an empty array by default) and the resume post ID - and returns the groups. Each group is id / label / fields; each field is key / label / type plus optional required, placeholder, description, and options:

add_filter( 'wcb_resume_form_fields', function( $groups, $resume_id ) {
$groups[] = [
'id' => 'links',
'label' => __( 'Online presence', 'wp-career-board-pro' ),
'fields' => [
[
'key' => '_wcb_resume_github_url',
'label' => __( 'GitHub profile', 'wp-career-board-pro' ),
'type' => 'url',
'required' => false,
],
[
'key' => '_wcb_resume_linkedin_url',
'label' => __( 'LinkedIn profile', 'wp-career-board-pro' ),
'type' => 'url',
'required' => false,
],
[
'key' => '_wcb_resume_website_url',
'label' => __( 'Personal website', 'wp-career-board-pro' ),
'type' => 'url',
'required' => false,
],
],
];
return $groups;
}, 10, 2 );

After this filter is in place:

  • The full multi-section Resume Builder renders a new “Online presence” group of fields.
  • The single-page Resume Form and the Quick Resume Form render the same group inline.
  • Each value persists as resume post meta under the exact key you declared - so the example above writes _wcb_resume_github_url, _wcb_resume_linkedin_url, and _wcb_resume_website_url. Choose a prefixed, collision-safe key; there is no automatic prefix added for you.
  • Read a saved value back on the front end with get_post_meta( $resume_id, '_wcb_resume_github_url', true ).

Same field types as Free’s Custom Fields filter:

text, textarea, email, tel, url, number, date, select, checkbox, radio, multiselect.

For Interactivity-API-driven forms (the Resume Builder, the single-page Resume Form, and the Quick Resume Form), the initial state hydrates from a separate filter so you can pre-populate values from a partner site or referral context. The filter receives the state array and the resume post ID (not the user ID):

add_filter( 'wcb_resume_form_initial_state', function( $state, $resume_id ) {
// Pre-fill from a partner integration keyed off the resume's author.
$author_id = (int) get_post_field( 'post_author', $resume_id );
$partner_data = get_user_meta( $author_id, '_partner_profile_links', true );
if ( $partner_data ) {
$state['customFields']['_wcb_resume_github_url'] = $partner_data['github'] ?? '';
$state['customFields']['_wcb_resume_linkedin_url'] = $partner_data['linkedin'] ?? '';
}
return $state;
}, 10, 2 );

The custom-field values live under the customFields key of the state object (keyed by the field key you registered), alongside built-in keys such as summary, sections, isPublic, and customFieldGroups.

If you’d rather configure custom fields without writing PHP, install the Field Builder admin page - it writes to the wcb_field_groups / wcb_field_definitions Pro tables and contributes to the wcb_resume_form_fields filter at runtime.

Each value is saved as a single post meta row on the wcb_resume post, under the exact key you registered. There is no extra prefix and no bundled meta key.

Storage Key
Per-field post meta the key you declare (e.g. _wcb_resume_github_url)
Read on the front end get_post_meta( $resume_id, '<key>', true )
Save over REST PUT /wcb/v1/resumes/{id} with a custom_fields object in the body, keyed by field key

The default GET /wcb/v1/resumes/{id} response returns id, title, permalink, summary, and sections - it does not include custom fields out of the box. To add them to the response, hook the wcb_rest_prepare_resume filter and append your values.

Each value is sanitized by its declared type before it is written to meta (there is no separate “required” enforcement layer):

  • email - sanitize_email()
  • url - esc_url_raw()
  • number - kept only if numeric, otherwise stored empty
  • date - kept only if it matches YYYY-MM-DD, otherwise stored empty
  • textarea - sanitize_textarea_field()
  • checkbox - stored as '1' when on, empty string when off
  • multiselect - collapsed to a comma-separated string of option values
  • everything else - sanitize_text_field()

To reject a value or transform it further, hook wcb_save_custom_field ($value, $key, $owner_id) and return null to skip persistence or a scalar to override it.