Support » Developing with WordPress » Google Place ID

  • I have a post input field for Google Places. I pick a place like “Dallas, Texas, USA” and that is then shown in the post.

    How would I do to have the post return the Place ID instead of just the name like “Dallas, Texas, USA”?

    (I want to be able to use the Google Map API to search for places instead of relying on text-search, eg get all places in an area.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz


    You’d need the API to give you the ID based on the field value. Depending on API restrictions and your needs, you can either use client side JS to interact with the API, or send API requests directly from your server, using the returned data as part of the generated page output. Look for a plugin that interacts with Google APIs. Even if it’s not directly applicable to your need, you can use it as guidance on how to interact with the API for your own coding efforts.

    Thanks for the reply, I’ll try your suggesstion.

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