• Resolved nobbynob

    (@nobbynob)


    Hi

    I have been following this tutorial for adding a custom field: https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/

    The field does get added to the job form, but when adding this code for the admin:

    add_filter( 'job_manager_job_listing_data_fields', 'custom_job_manager_job_listing_data_fields' );
    
    function custom_job_manager_job_listing_data_fields( $fields ) {
    
    $fields['_job_test'] = array(
    
    'label' => __( 'MyCustomSalary ($)', 'job_manager' ),
    
    'type' => 'text',
    
    'required' => true,
    
    'placeholder' => 'e.g. 20000',
    
    'description' => ''
    
    );
    
    return $fields;
    
    }

    I don’t see it added to the admin at all. Where Im looking is here Job Listings > Job Manager Custom Fields. Am I looking in the right place? Or is there a bug?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • @nobbynob

    you′re mssing the second part of the code, which adds the field to the admin section

    Hi @nobbynob,

    The custom job field will show up when you go to Job Listings > Add Job, as a new field on that form. I copied your code exactly onto a test site and it showed up on the Add Job form on the wp-admin.

    If you have any other questions, give us a shout!

    Plugin Support Jay

    (@bluejay77)

    Hi @nobbynob ,

    It has been more than one week since we have heard from you, so I’m marking this topic as resolved.

    But if you have any further questions or need some more help, you’re welcome to reply here or open another thread.

    Thread Starter nobbynob

    (@nobbynob)

    Hi

    I attempted adding the job but to no avail. I did however see it in the new job. But Im unable to see the data type in the ‘admin’. I guess I’m using another plugin that cant read the newly created field. I’m using “Job Manager custom fields.”

    • This reply was modified 1 year, 9 months ago by nobbynob.
    • This reply was modified 1 year, 9 months ago by nobbynob.
    Plugin Support lastsplash (a11n)

    (@lastsplash)

    Hi @nobbynob

    If you are using another plugin for this functionality, you will need to reach out to those developers for assistance. Otherwise, you can disable that plugin and try adding the field using the code provided on our site:

    https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom field not showing in ‘Admin’’ is closed to new replies.