Title: Pass a location as a shortcode attribute?
Last modified: June 22, 2026

---

# Pass a location as a shortcode attribute?

 *  Resolved [crdunst](https://wordpress.org/support/users/crdunst/)
 * (@crdunst)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/pass-a-location-as-a-shortcode-attribute/)
 * Hi guys, hopefully a quick question for you – is it possible to have a ‘master’
   map, and include it on a page with a shortcode, but passing a location to centre
   the map on that location (either by name or lat/long)?
   It’s for a custom post
   type of locations, and in our template I’d include the shortcode and pass the
   location in as an attribute to show the map of that area?Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [DylanAuty](https://wordpress.org/support/users/dylanauty/)
 * (@dylanauty)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/pass-a-location-as-a-shortcode-attribute/#post-18946583)
 * Hi [@crdunst](https://wordpress.org/support/users/crdunst/),
 * Thanks for reaching out! Yes, we do support this and quite a few shortcode level
   overrides.
 * The following documentation should be helpful:
    - [https://www.wpgmaps.com/help/docs/map-shortcode/](https://www.wpgmaps.com/help/docs/map-shortcode/)
 * More specifically, what you’d be looking for is:
 *     ```wp-block-code
       [wpgmza id="1" marker="1"]
       ```
   
 * Or alternatively, if you’d like to be run with direct coordinates instead:
 *     ```wp-block-code
       [wpgmza id="1" lat="36.778" lng="-119.417" zoom="12"]
       ```
   
 * The second option will load at the specific coordinates with the preferred zoom
   level. The first option will focus on the specific marker, opening it’s info-
   window as well, if configured to do so.
 * I hope that helps?
 *  Thread Starter [crdunst](https://wordpress.org/support/users/crdunst/)
 * (@crdunst)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/pass-a-location-as-a-shortcode-attribute/#post-18946734)
 * That’s perfect, thanks. I’m not sure how I missed your documentation page, but
   that has everything we need, thanks for your help.
 *  Plugin Author [DylanAuty](https://wordpress.org/support/users/dylanauty/)
 * (@dylanauty)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/pass-a-location-as-a-shortcode-attribute/#post-18946961)
 * Glad to hear that helped [@crdunst](https://wordpress.org/support/users/crdunst/)–
   If you need anything else, give us a shout!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpass-a-location-as-a-shortcode-attribute%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-google-maps/assets/icon-256x256.gif?rev=3576706)
 * [WP Go Maps - Google Map, OpenStreetMap, Leaflet Map](https://wordpress.org/plugins/wp-google-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-maps/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [DylanAuty](https://wordpress.org/support/users/dylanauty/)
 * Last activity: [1 week, 4 days ago](https://wordpress.org/support/topic/pass-a-location-as-a-shortcode-attribute/#post-18946961)
 * Status: resolved