Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mark Wilkinson

    (@wpmarkuk)

    This page on the Github Wiki should help you out:

    https://github.com/highrisedigital/wpbroadbean/wiki/Editing-Job-Fields

    It will add the field to the admin and also process the field in the sent XML and save the data with the job.

    Thanks for the code sample, Mark. Are you able to advise where this code is to be placed? Everywhere I put it, it breaks the solution.

    Thanks in advance,
    Jonny

    Plugin Author Mark Wilkinson

    (@wpmarkuk)

    The code should be placed either in the themes functions.php file or better still in a plugin, perhaps in the mu-plugins folder.

    Thanks again Mark.

    I’ve added the following code to the functions.php file, however I am getting a 500 Internal Server Error. Any ideas?

    function wpbb_add_new_field( $fields ) {
        $fields[ 'job_industry_parent' ] = array(
            'name'      => 'Job Industry Parent',
            'id'        => '_wpbb_job_industry_parent',
            'bb_field'  => 'job_industry_parent',
            'desc'      => 'Job Industry Parent',
            'type'      => 'text',
            'readonly'  => false,
            'cols'      => 12,
            'show_on_fronted' => true
        )
        return $fields;
    }
    add_filter( 'wpbb_job_fields', 'wpbb_add_new_field' ); 
    Plugin Author Mark Wilkinson

    (@wpmarkuk)

    Looks like there is a semi colon missing!

    Try this:

    function wpbb_add_new_field( $fields ) {
        $fields[ 'job_industry_parent' ] = array(
            'name'      => 'Job Industry Parent',
            'id'        => '_wpbb_job_industry_parent',
            'bb_field'  => 'job_industry_parent',
            'desc'      => 'Job Industry Parent',
            'type'      => 'text',
            'readonly'  => false,
            'cols'      => 12,
            'show_on_fronted' => true
        );
        return $fields;
    }
    add_filter( 'wpbb_job_fields', 'wpbb_add_new_field' );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding Custom field in Broadbean Plugin’ is closed to new replies.