1. Home
  2. Developer
  3. Code Snippets
  4. Setting allowed remote work locations

Setting allowed remote work locations

The JSON Job Posting schema https://developers.google.com/search/docs/appearance/structured-data/job-posting#applicant-location-requirements
allows you to set remote work location, but Bullhorn doesn’t have these as default settings, so if you what to set them, then we need to add some code
Note: you will need to make sure the customText1-20 field using the Job Object Customizer Extension add-on or via code

add_filters( 'matador_bullhorn_import_location_requirements_fields', function(){ 
return array(
   'type' => 'CustomText1', // the Bullhorn feild that holds the type value 
   'name' => 'CustomText2',   // the Bullhorn feild that holds the location value
); 
});

Or is always one location then you can set it with code like this

add_filters( 'matador_bullhorn_import_save_job_jsonld', function( $ld ){ 
$ld['applicantLocationRequirements']['@type'] = 'Country;
$ld['applicantLocationRequirements']['@name'] = 'UK';
return $ld 
} );

having to set the type in Bullhorn is a bit redundant so you might what to use both filters

add_filters( 'matador_bullhorn_import_location_requirements_fields', function(){ 
return array(
   'type' => 'CustomText2', //set value to the otherwise the name will not be added  
   'name' => 'CustomText2',   // the Bullhorn feild that holds the location value
); 
});
// then overright the type with a fixed value
add_filters( 'matador_bullhorn_import_save_job_jsonld', function( $ld ){ 
$ld['applicantLocationRequirements']['@type'] = 'Country;

return $ld 
} );

As this is all custom you will need to test with https://validator.schema.org/ or/and https://search.google.com/test/rich-results
Note: you will need to do a Hard sync to update the cache LD+JSON data

Updated on May 1, 2023
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support