Title: Help with shortcode php
Last modified: April 15, 2023

---

# Help with shortcode php

 *  Resolved [storm6969](https://wordpress.org/support/users/storm6969/)
 * (@storm6969)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/help-with-shortcode-php/)
 * Hello i want to edit default location template and add a map zoom on this location
 * like
 *     ```wp-block-code
       <?php echo do_shortcode('[open-user-map ids="1159" lat="51.50665732176545" long="-0.12752251529432854" zoom="13"]'); ?>
       ```
   
 * but how i can do it with variable please?
 * thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhelp-with-shortcode-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [storm6969](https://wordpress.org/support/users/storm6969/)
 * (@storm6969)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/help-with-shortcode-php/#post-16658122)
 * ok got it
 *     ```wp-block-code
       <?php $var_id = get_the_id(); ?>
       <?php $lat_id = oum_get_location_value("lat", $var_id); ?>
       <?php $lng_id = oum_get_location_value("lng", $var_id); ?>
       <?php echo do_shortcode('[open-user-map ids='.$var_id.' lat='.$lat_id.' long='.$lng_id.' zoom="15"]'); ?>
       ```
   
 *  Plugin Author [100plugins](https://wordpress.org/support/users/100plugins/)
 * (@100plugins)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/help-with-shortcode-php/#post-16659409)
 * I guess you already know, that you could also use this Shortcode as well:
 *     ```wp-block-code
       [open-user-map-location value="map"]
       ```
   
 * It shows just the single location. However – you can not adjust the zoom level
   manually.
 * Best Regards, 
   Daniel

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

The topic ‘Help with shortcode php’ is closed to new replies.

 * ![](https://ps.w.org/open-user-map/assets/icon-256x256.png?rev=2779645)
 * [Open User Map](https://wordpress.org/plugins/open-user-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/open-user-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/open-user-map/)
 * [Active Topics](https://wordpress.org/support/plugin/open-user-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/open-user-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/open-user-map/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [100plugins](https://wordpress.org/support/users/100plugins/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/help-with-shortcode-php/#post-16659409)
 * Status: resolved