WPJM Job Schema Plugin for WordPress

Schema.org markup is the future of the crawlable web, as search engines grow more and more favourable to easily parsed code that make their job easier.

This new structured data is behind a lot of the new “smarter” search results that you’ll find in Google – whether it be from flight info to menus.  The chances are the reason those flights, and those menus, appear to you is because that site has good structured data.

Google is now turning it’s focus towards jobs, and they’ve recently announced that they’ll be offering job search results that use structured data to show job seekers what they’re looking for.

Schema can be quite complicated if you’re not familiar with it, and it can be tricky to get every little piece right.  But luckily, if you use the very popular WordPress plugin WP Job Manager and my brand new plugin WPJM Schema, it’ll be a piece of cake.

All you need to do to get your JobPosting schema working is to download my plugin either from the WordPress repository, or from GitHub, and activate it on your site.  After that your pages will be marked up with all the important details about your jobs so that search engines know what you’re offering and, more importantly, show it to hundreds of people on their results.

Update: 27th June – The plugin now features markup that’s even more optimised for Google, using their preferred attributes.  It also features the ability to create a jobs sitemap and have it auto-generated and sent to Google when it’s updated so they’ll always have the freshest copy of your site available.

I hope the plugin helps people find some success in getting their job results listed, and I’m hoping myself to get great results with my Gaelic jobs website obraichean.co.uk

Structured data is here to stay, so the important thing is to make sure that you’re on top of it.  This might be a good first step towards doing that.

If you have any comments on the plugin let me know below, in the WordPress support column or flag up an issue or pull request on GitHub.

Update 21st July – Here’s a more rounded overview of the filters you can use with this plugin:

Filters/Customisation

There are filters you can use by placing code in a child theme or functionality plugin to modify how WPJM schema works.

Filter Schema values

You can easily filter the schema values, for both job postings and the website, so they correspond with what you want them to be. The schema is created in an array format, following the relevant specifications for WebSites or JobPostings], so as long as you edit in that same method then it should work.

The filters are: wpjm_schema_custom_job_fields (JobPosting) / wpjm_schema_custom_website_fields (WebSite)

For example: to change “name” on the first level of the schema you can just filter $job_schema['name']. If you want to change the identifier value, change $job_schema['identifier']['value'].

Example of job schema change – setting identifier value to something in post meta

add_filter( 'wpjm_schema_custom_job_fields', 'my_custom_schema_filter' );
function my_custom_schema_filter( $job_schema ){

global $post;

$job_schema['identifier']['value'] = get_post_meta( $post->ID, 'custom_job_reference', true );

return $job_schema;

}

Example of web schema change

add_filter( 'wpjm_schema_custom_website_fields', 'my_custom_web_schema_filter' );
function my_custom_web_schema_filter( $website_schema ){

// Add a social link to the sameAs array
$website_schema['sameas'][] = 'https://twitter.com/mysitetwitteracount';

return $website_schema;

}

Filter Schema types

We’ve also included two filters you can use to optionally hide schema: wpjm_schema_show_job_schema / wpjm_show_website_schema

Example to hide website schema

add_filter( 'wpjm_schema_show_website_schema', 'hide_web_schema_function');
function hide_web_schema_function( $show_schema ){
return false;
}

Filter sitemap creation

Finally, there are two filters that apply to the sitemap generation. One filter wpjm_schema_generate_job_sitemap will turn on/off the sitemap generator and wpjm_schema_ping_search_engines will turn on/off the ability to ping Google with the changes made to the sitemap.

Example to hide website schema

add_filter( 'wpjm_schema_ping_search_engines', 'turn_google_ping_off');
function turn_google_ping_off( $ping_google ){
return false;
}

14 thoughts on “WPJM Job Schema Plugin for WordPress

    1. Hey Ben, the feature is US-only at the moment and I’m based in the UK so unfortunately not seen any results myself yet!

      Check out the latest version of the plugin though, I’ve updated it to have sitemap functionality that pings Google so you should hopefully get results pretty quickly with it.

      I’ve let the WP Job Manager team know about the plugin so they might add in the functionality in core soon enough.

      1. Steven quick question
        can I just clarify that all I need to do is add this plugin, activate it, and do nothing more?

        Also, I have the below plugin active also, could there any conflict there do you think? It doesn’t look like your plugin is having any issues with it but said I’d ask.

        Thanks!
        all-in-one-schemaorg-rich-snippets

        1. Yeah simple as adding it and activating it. It might duplicate website schema, so you’ll need to use the a filter like this to turn it off:
          add_filter( 'wpjm_schema_show_website_schema', 'hide_web_schema_function');
          function hide_web_schema_function( $show_schema ){
          return false;
          }

          If the plugin has an option for the Jobs custom post type or for JobPosting schema I’d turn it off in the plugin, then there’ll be no conflicts hopefully.

  1. I tried this and activated it, however when I go to test my sitemap ending /job-sitemap.xml at https://search.google.com/structured-data/testing-tool/u/0/ it looks way different than Googles suggested markup. Am I missing something? I tried adding the code below to my theme functions.php and the markup still looks like straight xml with only the job web address and job date showing. My markup is missing all the @context, @type, title, description, name, hiring organization, etc that google appears to be after.

    // Example of job schema change – setting identifier value to something in post meta
    add_filter( ‘wpjm_schema_custom_job_fields’, ‘my_custom_schema_filter’ );
    function my_custom_schema_filter( $job_schema ){

    global $post;

    $job_schema[‘identifier’][‘value’] = get_post_meta( $post->ID, ‘custom_job_reference’, true );

    return $job_schema;

    }

    1. Hi Gordon, it’s not the sitemap you should be testing at the Structured Data Testing tool, it’s one of your actual job listing pages – as that’s where the schema is held. The sitemap is a way of telling Google where to look, but it’s the job postings where the real action happens.

      Let me know if you’ve any other questions 🙂

      1. I’m experiencing same issue as Gordon. The job-sitemap.xml file is very basic – only shows date and values. Testing a job post URL via Google’s structured data tool returns numerous errors saying certain fields are required, etc. Great plugin idea but doesn’t seem to work. I tested on a few sites.

    1. Hi Duncan, thanks for the comment. Yes, the WPJM have implemented schema now in the plugin. My code does cover some extra elements that aren’t included in the WPJM implementation but the essential elements are all in there!

Leave a Reply

Your email address will not be published. Required fields are marked *