Title: Dynamic shortcode using data from our API
Last modified: May 20, 2017

---

# Dynamic shortcode using data from our API

 *  Resolved [marceshleman](https://wordpress.org/support/users/marceshleman/)
 * (@marceshleman)
 * [9 years ago](https://wordpress.org/support/topic/dynamic-shortcode-using-data-from-our-api/)
 * Hey, we have created our own plugin that connects to our API and pulls in data
   to a WordPress site.
 * Wondering if it is possible to use your plugin to do something like this, and
   have it create a map.
 * `<?php echo do_shortcode('[codepeople-post-map name="'.$event->location->name.'"
   center="'.$event->location->position.'" width="100% height="300"]'); ?>`
 * $event->location->name = Venue Name;
    $event->location->position = 51.044308,-
   114.0630914
 * You can view our plugin docs here [https://github.com/showpass/showpass-wordpress-plugin](https://github.com/showpass/showpass-wordpress-plugin)
    -  This topic was modified 9 years ago by [marceshleman](https://wordpress.org/support/users/marceshleman/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [9 years ago](https://wordpress.org/support/topic/dynamic-shortcode-using-data-from-our-api/#post-9151303)
 * Hello [@marceshleman](https://wordpress.org/support/users/marceshleman/),
 * I’m sorry, but our plugin does not works in that way, the center attribute defines
   only that, the center of the map, but does not generate any new pin on the map.
   Our plugin generate the pins on the map based on the points defined in the pages/
   posts of website.
 * However, if your events are posts (defined as a custom post_type), you can associate
   our plugin with the corresponding post type, and it will display the points associated
   to the events, or will display the pins for the events with the metadata: geo_latitude,
   and geo_longitude (that are define too by the WordPress App in IOS and Android)
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Dynamic shortcode using data from our API’ is closed to new replies.

 * ![](https://ps.w.org/codepeople-post-map/assets/icon-256x256.jpg?rev=980165)
 * [CodePeople Post Map for Google Maps](https://wordpress.org/plugins/codepeople-post-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/codepeople-post-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/codepeople-post-map/)
 * [Active Topics](https://wordpress.org/support/plugin/codepeople-post-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/codepeople-post-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/codepeople-post-map/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/dynamic-shortcode-using-data-from-our-api/#post-9151303)
 * Status: resolved