WordPress.org

Forums

WP Job Manager
[resolved] Adding Field in Resume (3 posts)

  1. OliverG81
    Member
    Posted 1 year ago #

    Hi Mike

    Currently trying out changing the names of the fields in job manager. I followed the instructions under title; "Advanced: Editing resume submission fields" https://github.com/mikejolley/WP-Job-Manager/wiki/resume-manager.

    I managed to get that example working where I changed the field to The Candidate Name.

    I now want to try adding my own field to those that already exist.

    Am I correcting in thinking that I should...

    1) Be adding in the 3 stages of code to the functions.php file?

    2) Ensuring that I replace the likes of 'submit_job_form_fields' with 'submit_resume_form_fields' ??

    3) Be follow the 3 step "Step by step example - adding a salary field" instructions https://github.com/mikejolley/WP-Job-Manager/wiki/Editing-Job-Submission-Fields

    I have tried to alter the code below, trying to identify and replace the code for resume-form and not job-form.

    I don't know how to replace everything, so I have added 4 x asterix or **** either side of that which I am trying to highlight. Does that make sense? I couldn't bold the code.

    Could you have a look and let me know what I should be adding?

    It would be helpful if there were similar instructions on adding a field in the resume_manager Github.

    Thanks - Oliver.

    add_filter( 'submit_resume_form_fields', 'frontend_add_social_media_field' );
    
    function frontend_add_social_media_field( $fields ) {
        $fields['resumes']['social_media'] = array(
            'label'       => __( 'Social Media', ****'job_manager'****),
            'type'        => 'text',
            'required'    => true,
            'placeholder' => '',
            'priority'    => 7
        );
        return $fields;
    }
    
    **** add_action( 'job_manager_update_job_data', 'frontend_add_social_media_field_save', 10, 2 );****
    
    function frontend_add_social_media_field_save( $job_id, $values ) {
        update_post_meta( $resume_id, '_social_media', $values['resume']['social_media'] );
    }
    
    add_filter( 'job_manager_job_listing_data_fields', 'admin_add_salary_field' );
    
    function admin_add_social_media_field( $fields ) {
        $fields['_social_media'] = array(
            'label'       => __( 'Social_Media', **** 'job_manager' **** ),
            'type'        => 'text',
            'placeholder' => '',
            'description' => ''
        );
        return $fields;
    }

    https://wordpress.org/plugins/wp-job-manager/

  2. Mike Jolley
    Member
    Plugin Author

    Posted 1 year ago #

    1. ****'job_manager'**** Textdomain doesn't matter unless you are translating. Use resume_manager or remove it entirely.
    2. resume_manager_update_resume_data

  3. bwEngland
    Member
    Posted 8 months ago #

    Hi OliverG81

    Did you ever get this working - struggling here!!

    If only we know how the magic worked??

    Thanks in advance.
    Mark

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Job Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.