• Resolved Andrew Rothman

    (@arothman)


    I’m using WP All Import and the “Import Listings into WP Job Manager” plugin to bring jobs from an RSS feed into WP Job Manager. When I map only city and state it all looks and works correct on the site, but as soon as I add the postalCode it breaks the JSON object and I get this:

    “jobLocation”:{
    “@type”:”Place”,
    “address”:”Denver, CO 80012″
    }

    Rather than this:

    “jobLocation”:{
    “@type”:”Place”,
    “address”: {
    “@type”: “PostalAddress”,
    “addressLocality”: “Denver”,
    “addressRegion”: “CO”,
    “postalCode”: “80012”,
    },

    Google is, consequently, reporting that my jobs are missing the zipcode if I don’t try to add it, and that they’re missing the entire address if I do try to add it.

    Is there a different way to map or import the data into the job so that the city/state/zip data are properly split up in the JSON object?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi,

    It sounds to me like your issue is with the “Import Listings into WP Job Manager” plugin, and not with Wp Job Manager itself, correct? I see that you’ve asked them already:

    https://wordpress.org/support/topic/google-jobs-json-object-and-imported-locations/

    Since that plugin isn’t made by us, I won’t be able to assist with this issue, sorry!

    Thread Starter Andrew Rothman

    (@arothman)

    Actually, I don’t think this is an issue with the import. It’s a question about where I should be importing the zipcode data to. The problem occurs even when I manually enter a job.

    If the Location field contains “Denver, CO” the schema is valid, but missing the zipcode:

    {“@type”:”Place”,”address”:{“@type”:”PostalAddress”,”addressLocality”:”Denver”,”addressRegion”:”CO”,”addressCountry”:”US”}}

    But when I put “Denver, CO 80012” into the location box, the schema is invalid:

    {“@type”:”Place”,”address”:”Denver, CO 80012″}

    I’m trying to figure out how to add zipcodes to the jobs in such a way that the JSON object is properly formatted. Is there some other field I should be putting the zip into?

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Ah, I understand! The problem is that you should be entering a full address, including a street address. If you do that, then it should work fine.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Actually, on further thought, I’m not sure why you’re getting an error. I tried it on my test site:

    https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fwpjm1.reviewmysite.ca%2Fjob%2Fwpjm-denver-co-80012-2-testing-denver-location%2F

    As you can see, the schema is fine (though Google suggests I add a street address):

    `
    jobLocation”:{“@type”:”Place”,”address”:{“@type”:”PostalAddress”,”addressLocality”:”Denver”,”addressRegion”:”CO”,”postalCode”:”80012″,”addressCountry”:”US”}}}
    `

    Have you added a valid Google Maps key to Job Listings -> Settings ?

    Thread Starter Andrew Rothman

    (@arothman)

    Hi Richard,

    I do have a Maps key in there, and I can see that the ‘custom fields’ section on the job includes the geolocation_formatted_address, geolocation_lat, geolocation_long etc. but when I view the JSON object there’s no postalcode.

    When I click on a job listing in the admin area of WordPress, where should I see the postalcode? I see City and State, but I don’t know where postalcode is supposed to be put into the job.

    Thread Starter Andrew Rothman

    (@arothman)

    I got my answer:

    If you’re importing the zipcode, rather than relying on Google’s API for it, you want to put the zipcode into the “geolocation_postcode” custom field. That gets it lined up properly.

    • This reply was modified 5 years, 3 months ago by Andrew Rothman. Reason: typo fix
    Plugin Contributor Richard Archambault

    (@richardmtl)

    Glad you found it, and thanks for letting us know the solution, in case someone else comes across the same problem!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Job location data coming out wrong in JSON schema’ is closed to new replies.