• Resolved Thomas

    (@stoetzman)


    Hello

    I would like to hide a few fields from the Job Submission form. I tried to follow those instructions but I still getting an error message. That’s the code I put into my functions.php.
    What am I missing?

    `add_filter( ‘submit_job_form_fields’, ‘custom_submit_job_form_fields’ );
    function custom_submit_job_form_fields( $fields ) {
    unset( $fields[‘company’][‘company_twitter’] );
    unset( $fields[‘company’][‘company_video’] );
    return $fields;
    }

    Thanks in advance for your help

    https://ww.wp.xz.cn/plugins/wp-job-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    What error are you getting?

    You’ll want to use a later priority since this is filtering jobify fields:

    add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields', 50 );
    Thread Starter Thomas

    (@stoetzman)

    I tried the new code and I’m still getting the same error:

    Fatal error: Cannot redeclare custom_submit_job_form_fields() (previously declared in /home/…/…/…/wp-content/themes/celestial-lite-child/functions.php:241) in /home/…/…/…/wp-content/themes/celestial-lite-child/functions.php on line 256

    Could it be because I have the following code snipped. I use this to change a lable before:


    add_filter( ‘submit_job_form_fields’, ‘custom_submit_job_form_fields’ );
    function custom_submit_job_form_fields( $fields ) {
    $fields[‘job’][‘job_title’][‘label’] = “Job Title”;
    return $fields;
    }

    Plugin Author Mike Jolley

    (@mikejolley)

    Yes; you have 2 functions named the same (custom_submit_job_form_fields). Rename one, or combine the functions into 1.

    Thread Starter Thomas

    (@stoetzman)

    Great, thank you. That works perfectly!!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hide fields from submission form’ is closed to new replies.