Help with php code please
Posted: Tue Mar 29, 2016 7:05 pm
Hi, Im trying to add this code to execute this tutorial explained here https://wpjobmanager.com/document/tutor ... -for-jobs/ under "Add the field to the frontend"
I cant seem to get it to work. I tested the code online in several sources and receive an error "FATAL ERROR Call to undefined function add_filter() on line number 2"
Any help greatly appreciated. Thanks
I cant seem to get it to work. I tested the code online in several sources and receive an error "FATAL ERROR Call to undefined function add_filter() on line number 2"
Code: Select all
<?php
add_filter( 'submit_job_form_fields', 'frontend_add_salary_field' );
function frontend_add_salary_field( $fields ) {
$fields['job']['job_salary'] = array(
'label' => __( 'Salary ($)', 'job_manager' ),
'type' => 'text',
'd' => true,
'placeholder' => 'e.g. 20000',
'priority' => 7
);
return $fields;
}