Title: Get different map per post?
Last modified: August 21, 2016

---

# Get different map per post?

 *  Resolved [dmonaco83](https://wordpress.org/support/users/dmonaco83/)
 * (@dmonaco83)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/)
 * I have an Events custom post type and I am wondering how I display a different
   map per post? In my template I use:
 * if ( function_exists( ‘pronamic_google_maps’ ) ) {
    pronamic_google_maps( array(‘
   width’ => 290, ‘height’ => 200 ) ); }
 * That just outputs a map but it’s defaulting to the first location it sees. Is
   there a place to add the post ID and tell it to take the map location from that
   post? This is all being run through a loop using wordpresses get_posts function.
 * I hope that makes sense.
 * [http://wordpress.org/plugins/pronamic-google-maps/](http://wordpress.org/plugins/pronamic-google-maps/)

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

 *  Thread Starter [dmonaco83](https://wordpress.org/support/users/dmonaco83/)
 * (@dmonaco83)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/#post-4187081)
 * I can’t find anything through a ton of searching. I have a page that will show
   about 5 different events and beside each post in it’s own div I want a map displayed
   that has the coordinates I added to that post.
 * EX
 * | map of street b || description of event b
    | map of street j || description
   of event j
 * Is this possible?
 *  [Leon Rowland](https://wordpress.org/support/users/zogot/)
 * (@zogot)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/#post-4187220)
 * Hello dmonaco83
 * Unfortunately there is no support to request a Map based off Post ID. What it
   does instead is take the global $post object that is set when using the WordPress
   Loop.
 * I would recommend instead to use WP_Query and call the_post() on the custom WP_Query.
   This would then let the map show correctly.
 * Some reading to help you:
 * [http://codex.wordpress.org/Class_Reference/WP_Query](http://codex.wordpress.org/Class_Reference/WP_Query)
 *  [elisa.ghi](https://wordpress.org/support/users/elisaghi/)
 * (@elisaghi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/#post-4187364)
 * Hi Leon, I’m not sure to understand well your answer..
    I put this code (posted
   below) into the loop of single.php But the map show all the map’s post. I need
   to show just the place of the current post.. not all the posts’place..
 * Thank for an answer and sorry for my bad english!
 *     ```
       <?php if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
       					pronamic_google_maps_mashup (
       						array(
       							'post_type' => 'guida'
       						),
       						array(
       							'width'          => 615,
       							'height'         => 400,
       							'nopaging'       => false
   
       						)
       					);
       				}
       				?>
       ```
   
 *  [Leon Rowland](https://wordpress.org/support/users/zogot/)
 * (@zogot)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/#post-4187365)
 * Hello elisa.ghi
 * You are the same person as dmonaco83?
 * Your question seems different from what dmonaco83 was asking. For you, you don’t
   want to use the mashup, instead just pronamic_google_maps() will show you the
   map of the current post you are seeing.
 *  [elisa.ghi](https://wordpress.org/support/users/elisaghi/)
 * (@elisaghi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/#post-4187366)
 * Thank you very much Leon.. now it’s work perfectly.
    I’m not dmonaco83, and probably
   I don’t understand well dmonaco83’s question because of I thinked that dmonaco83
   has the same problem of me 🙁 I need to study english well.. Sorry end thank 
   you so much!!!!

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

The topic ‘Get different map per post?’ is closed to new replies.

 * ![](https://ps.w.org/pronamic-google-maps/assets/icon-256x256.png?rev=3194044)
 * [Pronamic Google Maps](https://wordpress.org/plugins/pronamic-google-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pronamic-google-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pronamic-google-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/pronamic-google-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pronamic-google-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pronamic-google-maps/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [elisa.ghi](https://wordpress.org/support/users/elisaghi/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/get-different-map-per-post/#post-4187366)
 * Status: resolved