Argument passing in shortcode

New home Forums Gold Add-on General queries Argument passing in shortcode

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35155
    clarkkgee
    Member

    Hello,
    I am new to the WP Mapping functions, but have found it very good so far. My situation is:
    Using the Divi Theme in WordPress, the shortcode on the page is currently in a full width code block and contains: [put_wpgm id=1]
    I would like to use variable to pass some information to the mapping function that I have not been able to find in your forum nor at “flipper Code”.
    Can this be done?
    If so, then
    What is the syntax I should use?
    and What are the available variable names?
    In particular, I am looking for center point lat/lon, and I want to provide a list of KML/KMZ files to display – and probably some others that I am not aware of yet. -grin-
    Thanks in advance for your reply,
    Clark

    #35169
    SupportTeam
    Moderator

    Hi Clark,

    Thank you for getting in touch with us.

    What plugins versions do you have installed (WP Google Maps and WP Google Maps Pro)? You can find them when you open Plugins section and scroll down to see our plugin.

    Here is the documentation on map shortcode parameter: https://www.wpgmaps.com/documentation/advanced-map-options/map-shortcode-parameters/

    Thank you for your time in this.

    Best regards,
    Jarek

    #35195
    clarkkgee
    Member

    Hello Jerek,
    I have WP Google Maps Pro (Gold) V 4.0.8 installed using WordPress 4.9.4 with Divi 3.0.100 as the Theme.

    The documentation you mentioned talks about some options you can use, but I would like to see a comprehensive list of the options. After looking at the “wp-google-map-gold.php” I suspect that the area relating to $shortcodeParams and in particular $map_options is the place that might allow these settings, but I could not see the option names I could use.

    I want to be able to supply WPGMP with the KML filename(s) and some of the other options in your code.
    Perhaps I can add a ?center_lat=”30.0″?center_lng=”-70.0″?kml_files=”file1.kml,file2.kml” to the url of the page? But I would think that there is a way to put these into the shortcode.
    Thanks,
    Clark

    #35199
    SupportTeam
    Moderator

    Hi Clark,

    I’m very sorry for back and forth on this.

    Could you please share the URL to the page with map? I’m a bit confused because we don’t have [put_wpgm] shortcode.

    Kind regards

    #35210
    clarkkgee
    Member

    Hi Jerek –
    I am sorry, it seems that I found the wrong link for support – It turns out that I have a different WP Google Maps Pro product – it’s from “Flipper Code” and has the same name as your plug in. Really confusing, and has been a waste of mine and your times – sorry about that
    Please disregard my post and feel free to remove it from your site.
    Sorry again for the confusion.
    Regards,
    Clark

    #35216
    SupportTeam
    Moderator

    Hi Clark,

    No worries. It happens.

    Kind regards

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