Skip Navigation

[Resolved] Displaying address in a pin's popup from a multiple address post

This support ticket is created 5 years, 6 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.

Our next available supporter will start replying to tickets in about 0.12 hours from now. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Shane 5 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1142003

I have a map displaying cafes across the US, and some of the cafe's have multiple addresses attached to the same cafe post. I want to display the address of each pin as the user clicks on the pin, so as not to have a disconnect between the map and the listing below.

Conversely, I would like to be able to put a "focus on pin" link next to the listing of each address (multiple per post result in loop) that would focus (with pin color change) on the pin at that address.

#1142517

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Conrad,

Thank you for contacting our support forum.

You should be able to add the multiple addresses within the marker but clicking on the address to jump to that address's marker would need to be done by custom coding, which would be out of our support scope.

Are the all the addresses added to that single post?

Please let me know.
Thanks,
Shane

#1142856

I've been able to add the addresses within the popup, but it shows all of the addresses in each pin for a cafe. Example:

Cafe 1:
Address 1
Address 2
Address 3

Cafe 1/Pin 1 should only show Address 1
Cafe 1/Pin 2 should only show Address 2
etc.

Currently, if I tell the popup to display the address of the cafe through a shortcode, it lists all of the addresses on each of pins:
Cafe 1/Pin 1 shows A1, A2, A3

Can you show me an example of the change to the shortcode needed to single out only the address that the pin is currently at?

Thanks

#1143063

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Conrad,

You are saying that it shows all the address of every cafe and not just the one that is for that pin correct?

Is your address field repeatable ? I mean are the multiple addresses stored on the same post?

Please let me know.

Thanks,
Shane

#1143086

Yes, the location field is repeatable. Sorry if that wasn't clear. There are multiple addresses on some posts.

#1143250

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Conrad,

What you can do to add the same fields to the marker you will need to use the shortcode below since it is a repeatable field.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-for-each

Please try this and let me know if this helps.
Thanks,
Shane

#1143672

Here is how my map marker shortcode appears now:

[wpv-map-marker map_id='na-companies'
marker_title='[wpv-post-title]'
marker_id='marker-[wpv-post-id]'
marker_icon='//altmann.haus/btza18/wp-content/uploads/2018/10/btza-pinc.png'
marker_icon_hover='hidden link'
marker_field='wpcf-company-address'][wpv-post-title]<br />[wpv-for-each field='company-address'][types field='company-address' postmeta='wpcf-address' index='' separator=', '][/types][/wpv-for-each][/wpv-map-marker]

The For-Each shortcode doesn't select and display the address at all now, should I have it in a different position, or does it not work inside the map marker code?

#1143891

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Conrad,

Would you mind providing me with admin access to the site so that I can have a look at this for you ?

The private field will be enabled for your next response.

Thanks,
Shane

#1143905

Since the implementation of a new map on the client website is time sensitive, we've opted to split the posts with multiple location fields into multiple posts with single locations. I also feel that it will better display the most accurate locations when users search by location and radius:

with multiple locations per post:
I search chicago, and it displays all cafes in chicago, but if any of those cafes have a branch in LA, the map zooms out to include LA locations…

I'm also able to include separate phone numbers for each location.

Since I'm skirting the issue with this solution, I don't think you'll need access. But it may be a good/simpler feature to include in a future release of the maps plugin.

#1143964

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Conrad,

Yes I wouldn't need access anymore.

What I recommend that you do is to open a feature request ticket with a detailed explanation on what you would like to see included in our Toolset maps plugin.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.