• Resolved dionysos73

    (@dionysos73)


    Hi Eliot,

    i have some issue about the shortcode [pass] combined with the option google_map. If i have understand, it supposed to display a google map with the address give on the appropriate field. But, it doesn’t work for me probably because i don’t use it correctly.

    that’s the code i use to try to display my map:

    [pass field=my_location]
      [google_map my_location='{FIELD}']
    [/pass]

    And that is displayed on my page:
    [google_map my_location=”]

    I use the plugin ACF and i have created a field “my_location” with the Google Map field, but i’m not sure your plugin can be used with that kind of field.

    So i have tried to replace the field Google Map in ACF with a textearea field where i attached the google integration code to display the map and it works. But it’s not really practical.

    Do you give me some better advice to use your plugin to show a google map, please ?

    Best regards.

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    The first point is, this plugin does not come with a Google map shortcode. I’ll make that more clear in the documentation’s code example. There are a number of plugins that provide a Google map shortcode, for example: Simple Google Maps Shortcode.

    I looked into the Google maps field for ACF. Hmm, it’s not so simple because it’s stored as an array, a collection of sub-fields. … OK, I made a new plugin update to allow passing values from an array field.

    So, assuming you have installed a plugin with a Google map shortcode, you can pass the map field like this:

    [pass array=map_field]
      [pw_map address='{ADDRESS}']
    [/pass]

    In this case, pw_map is provided by the simple map plugin I mentioned above.

    I added a note about this in the documentation, under Optional -> ACF -> Google map.

    One thing I noticed is that the ACF Google map field doesn’t store the zoom level. It would be more useful if it did.

    Thread Starter dionysos73

    (@dionysos73)

    Hi Eliot,

    Really thank you again, man. You’re faster and really efficient.

    I have tried with Simple Google Maps Shortcode, unfortunately this plugin seems not work anymore (maybe since the last WP upgrade) and the map would not display at all. So i have tried with Ultimate shortcode (i already use this plugin) and it works !

    Thanks for this quick upgrade!

    One question: in the future, did you think add some shortcode for display medias like videos or sound ?

    Best regards,

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

The topic ‘Using the shortcode [pass] with google_map’ is closed to new replies.