Support » Plugin: WP Job Manager » Adding Location to Schema without Google API

  • Resolved arothmanmusic

    (@arothmanmusic)


    I’m using WP ALL Import to bring in job data from another database. I am already importing city, state, zip, and country, so I just want to drop those values directly into the JSON object for the Google Jobs schema.

    Currently it’s coming out like so:

    “address”:”Grand Island, NE 68801 US”

    How do I get it broken down properly like this instead?

    “address”: {
    “@type”: “PostalAddress”,
    “streetAddress”: “y”,
    “addressLocality”: “Grand Island”,
    “addressRegion”: “NE”,
    “postalCode”: “68801”,
    “addressCountry”: “US”
    }

    Is there a template file or function I can alter to directly populate the complete address? I do not want to pay for Google’s Maps API when I already have the necessary data for the schema requirements.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter arothmanmusic

    (@arothmanmusic)

    Actually, I just realized that I ran into and figured out this exact same issue a few years ago!

    For those who are trying to accomplish the same, you want to import your values into custom fields with these names:

    geolocation_city
    geolocation_country_long / geolocation_country_short
    geolocation_state_long / geolocation_state_short
    geolocation_street
    geolocation_street_number
    geolocation_postcode

    See class-wp-job-manager-geocode.php for more.

    You’ll also want to put city and state into the _job_location custom field for the public to see.

    arothmanmusic – many many thanks for your thread and for sharing your insights into this topic.

    this is so awesome. I am very glad to read this thread.

    Thank you so much for sharing your findings ideas and tipps.

    keep up your great work –
    WP-Job-Manager rocks

    it is so awesome and outstanding and the
    community is getting bigger and bigger day by day

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.