Automattic / WP-Job-Manager

Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
https://wpjobmanager.com
GNU General Public License v3.0
899 stars 368 forks source link

applicantLocationRequirements schema now required for Remote (TELECOMMUTE) jobs #2305

Open Strijdhagen opened 2 years ago

Strijdhagen commented 2 years ago

Google just pushed an update that delists jobs when TELECOMMUTE and not including the applicantLocationRequirements schema. Would be great if we could implement this as a field!

bobmatyas commented 2 years ago

Another request for this on: 5509949-zen

This issue is coming up due to a change on Google's end as explained here: https://developers.google.com/search/docs/advanced/structured-data/job-posting

Google now expects something like:

"applicantLocationRequirements": [{
    "@type": "State",
    "name": "Michigan, USA"
 },{
    "@type": "State",
    "name": "Texas, USA"
 }],

in the schema to indicate where work can be performed.

cena commented 2 years ago

5562974-zen

Recieving Critical Error "missing field applicantLocationRequirements"

Would you consider including "applicantLocationRequirements" in the job schema for remote jobs. Potentially including a field to list allowed countries.

github-actions[bot] commented 2 years ago

Support References

This comment is automatically generated. Please do not edit it.

bobmatyas commented 2 years ago

Another request on 5684222-zen

bobmatyas commented 1 year ago

Requested on: https://wordpress.org/support/topic/missing-field-applicantlocationrequirements/?view=all

bharathganji commented 1 year ago

hi team, i am getting error, any plan in updating code according to schema..? , pls someone reply

or is there any alternate solutions i can use as remedy for now..!

image

bobmatyas commented 1 year ago

Another request on 6169128-zen

bobmatyas commented 1 year ago

Requested on: https://wordpress.org/support/topic/location-invalid/?view=all

theninabird commented 1 year ago

We are also running into this issue and would be interested in an update or a fix.

theninabird commented 1 year ago

For anyone else running into this, you can modify the structured data in your own theme/plugin by using the wpjm_get_job_listing_structured_data filter.

add_filter( 'wpjm_get_job_listing_structured_data', 'modify_job_listing_structured_data', 10, 2 );
function modify_job_listing_structured_data( $data, $post ) {
  if ( $post->_remote_position ) {
    $data['applicantLocationRequirements']['@type'] = 'Country';
    $data['applicantLocationRequirements']['name'] = 'USA';
  }

  return $data;
}
yscik commented 1 year ago

7122077-zen

dericleeyy commented 1 year ago

7179203-zen

promptpress commented 1 year ago

+1 for us - would be great to fix it

promptpress commented 1 year ago

For anyone else running into this, you can modify the structured data in your own theme/plugin by using the wpjm_get_job_listing_structured_data filter.

add_filter( 'wpjm_get_job_listing_structured_data', 'modify_job_listing_structured_data', 10, 2 );
function modify_job_listing_structured_data( $data, $post ) {
  if ( $post->_remote_position ) {
    $data['applicantLocationRequirements']['@type'] = 'Country';
    $data['applicantLocationRequirements']['name'] = 'USA';
  }

  return $data;
}

As I am not a theme or plugin developer - where exactly can I add this code snippet? We are using the Cariera theme.

theninabird commented 1 year ago

As I am not a theme or plugin developer - where exactly can I add this code snippet? We are using the Cariera theme.

You would need to create a child theme which unfortunately does require some coding. First you need to be able to access your site's files on the server via SFTP, and then you need to follow the instructions in the provided link and create some new files on the server. The code snippet would go inside of the functions.php file.

yscik commented 1 year ago

It's also possible to add the snippet without additional coding using the Code Snippets plugin

promptpress commented 1 year ago

@theninabird @yscik many thanks to both of you! We had a child theme already - I was only not sure if the functions.php file was the right one. We made it work and Google already indexed the job postings without any errors.

Datatech-AK commented 1 month ago

I'm actually quite astonished that WP Job Manager has been silently excluding telecommuting positions from Google Jobs by omitting this required field for the past two years. Compatibility with Google Jobs is one of the selling features on WPJM's market page, and this isn't a small issue. It should definitely be a team priority.