Skip Navigation

[Resolved] Show the map how it show on the Template

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 7 replies, has 3 voices.

Last updated by michelL 1 year, 9 months ago.

Assisted by: Minesh.

Author
Posts
#2592943
Show in Elementor.PNG

Hi there,

I want to show the map [map-21] and al the settings like the marker, controls etc on the Elementor page using a code.
Is this possible? Or do I have to create a map in the View option? If so do you have a video how I can do this?

#2593055

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

The legacy editor uses shortcodes to output maps and markers, and you should be able to add those shortcodes to a text module of Elementor and have them generate the map on the front end.

That would apply where you have a simple map with, say, a single marker.

If you have a more complex map with multiple markers coming dynamically from posts with address fields, you could create a View with the legacy editor that generates the map and markers, and then you can insert that with the View module in Elementor.

For details of the map shortcodes see https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render

For legacy documentation about displaying maps see https://toolset.com/documentation/legacy-features/maps-plugin/displaying-wordpress-content-on-maps/

To make a View with the legacy editor you will need to make sure the legacy editor is enabled at Toolset > Settings.

#2597663
View 1.PNG
Change the map settings here.PNG

Hi Nigel,

My PHP knowledge is not that great. Could you create a view (you also made this for me to show houses, attached) which I can copy and modify myself later? For you it's probably 5 minutes of work and for me a week 🙁

I want to show the location (the adres field) of the House in a Toolset map at:
hidden link

Hope you can help me.

#2597685

Minesh
Supporter

Languages: English (English )

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

I will require admin access details in order to access the page you shared.

*** 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.

#2598971

Minesh
Supporter

Languages: English (English )

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

Can you please check now:
- hidden link

I've added the map to your view's "Loop Editor" outside the view's loop:
=> hidden link

	[wpv-map-render map_id="map-29"][/wpv-map-render]

And I've added the marker shortcode using the shortocde block to your view's loop content template:
=> hidden link

  [wpv-map-marker map_id='map-29' marker_id='marker-[wpv-post-id]' marker_title='[wpv-post-title]' marker_field='wpcf-huisje-huren-adres'][wpv-post-link][/wpv-map-marker]

Can you please confirm it works as expected.

#2598995
like this only a Toolset view.PNG
can u use this View..PNG
adres field.PNG

Hi Minesh,

This is great (you can leave it that way) but I only want show the [adres] of the property on the page.

So like the Elementor map but then show as a Toolset View. hidden link
Can you use the view [map toont huisje] I made?

#2599055

Minesh
Supporter

Languages: English (English )

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

To display the current post address with map you will not require view.

So, I've created the following content template and added the map and marker shortcode to display the current post address to it:
=> hidden link

[wpv-map-render map_id="map-32"][/wpv-map-render]
[wpv-map-marker map_id='map-32' marker_id='marker-[wpv-post-id]' marker_field='wpcf-huisje-huren-adres'][/wpv-map-marker]

And I've added the above content template using the shortcode module to your elementor template:
=> hidden link

[wpv-post-body view_template="ct-show-current-address"]

Can you please confirm it works as expected now.

#2599121

My issue is resolved now. Thank you!