Skip Navigation

[Resolved] Dynamic map marker – my address is in 3 different fields

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by martinE-4 5 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1257693

Trying the new maps block. I like the dynamic map marker but my address is in 3 different fields. How do I concatenate it? I tried to put shortcodes in the map marker address spot but it did not work.

Ideas please?

many thanks!

#1257817

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Can I have problem URL and access details. And

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1259037

This is a local site. I could zip it up with Duplicator if you like? But it is a generic question. I simply can't just place one field in the dynamic field in the Maps block. (Google needs a concatenated address, city, province, postal code, country etc ie. MANY fields)

How do I do that?

#1259041

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I checked and there is no option to select address source for the marker from multiple fields.

I think as a workaround - you should try to create a content template and add your map and marker to that content template - for example:

[wpv-map-render map_id="map-2"][/wpv-map-render]
[wpv-map-marker map_id='map-2' marker_id='marker-2' address="[types field='field-1'][/types] [types field='field-2'][/types][types field='field-'][/types]"][/wpv-map-marker]

And later use content template block to add the map.

I would like to know, do you want to display multiple post address or address from a single post? because above example should work with single post.

#1261587

Thanks. My address1, address2, address3 fields are all in the same post. So your code looks good. Can you point me in the right direction...right now I'm using Types, Views, Maps and Blocks plugins to do this.
1. I have a single page template for my post which I am creating using Blocks. I was using the Maps Block but since there is no way of using it for one field...
2. I will instead use a shortcode block to show the map on the template using your code? If I follow the documentation on https://toolset.com/documentation/user-guides/display-on-google-maps/ I should be good right?

Do I have this right?

many thanks

#1262053

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

1. I have a single page template for my post which I am creating using Blocks. I was using the Maps Block but since there is no way of using it for one field...
==> Yes, thats correct. there is no way to use maps block in your case.

2. I will instead use a shortcode block to show the map on the template using your code? If I follow the documentation on https://toolset.com/documentation/user-guides/display-on-google-maps/ I should be good right?
=> As I suggested in my previous reply:
-- Create a content template (do not assign to any post type)
-- Add map and map marker shortcode and savve the content template
For example:

[wpv-map-render map_id="map-2"][/wpv-map-render]
[wpv-map-marker map_id='map-2' marker_id='marker-2' address="[types field='field-1'][/types] [types field='field-2'][/types][types field='field-3'][/types]"][/wpv-map-marker]

-- Add content temlate block to your page

#1269667

My issue is resolved now. Thank you! Brilliant!!