Skip Navigation

[Resolved] display custom fields in marker popup in map

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

Last updated by Minesh 1 year, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2623591
Scherm­afbeelding 2023-07-13 om 11.20.04.png

As a follow-up to this ticket https://toolset.com/forums/topic/custom-search-in-map-view/ I am trying to customize the marker popups.

In the view's loop, I have replaced the custom HTML block with a shortcode block, display the map shortcodes like this:

[wpv-conditional if="(has_term('woongroep', 'stadium', null) eq '1')"]

[wpv-map-marker map_id="map-1" marker_icon="hidden link" marker_id="marker-[wpv-post-id]" marker_field="wpcf-adres-woongroep"]

[wpv-post-link]

[/wpv-map-marker]

[/wpv-conditional]

[wpv-conditional if="(has_term('initiatiefgroep', 'stadium', null) eq '1')"]

[wpv-map-marker map_id="map-1" marker_icon="hidden link" marker_id='marker-[wpv-post-id]' marker_field="wpcf-adres-woongroep"]

[wpv-post-link]

[/wpv-map-marker]

[/wpv-conditional]

In the marker popup, I would like to display the post title with a link and some custom fields (text fields and an image field) and taxonomy terms.
See the example in the screenshot (however, the screenshot does not have the image field).

Link to the site:
hidden link
password: lvgo2023

#2623613

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

When I load the problem URL you shared: hidden link

I can see very few markers on the map and when I click on the map I can see only post title with link. Do you added the custom fields to the staging site's popup marker as well?

As with the code you shared:

[wpv-conditional if="(has_term('initiatiefgroep', 'stadium', null) eq '1')"]

[wpv-map-marker map_id="map-1" marker_icon="<em><u>hidden link</u></em>" marker_id='marker-[wpv-post-id]' marker_field="wpcf-adres-woongroep"]

[wpv-post-link]

[/wpv-map-marker]

[/wpv-conditional]

I can see you added only [wpv-post-link] shortcode. How are you displaying the custom fields?

Can you please share all those required details and what custom fields you want to display with marker popup and share admin access details.

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

#2623625

Minesh
Supporter

Languages: English (English )

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

What if you try to add the "Fields and Text" block instead of using the "shortcodes" block where you added the marker shortcodes you shared.

Instead add the "Fields and Text" block and then switch to the "HTML" mode and then use view's button available with this block to add your desired custom fields and taxonomies within the marker shortcode.

Please check the following screenshot:
- hidden link

#2623997

That is an excellent suggestion. I tried it out and it works.
You can view the results here: hidden link
(password: lvgo2023)
Thank you!

#2624007

Minesh
Supporter

Languages: English (English )

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

Glad to know that solution I shared help you to resolve your issue.

You are welcome to mark this ticket resolved.

#2624545

I tried twice to mark this issue as resolved (clicked in My issue is resolved and filled in all the fields) but the button Submit does not seem to work!

#2624547

Minesh
Supporter

Languages: English (English )

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

Please add different message like "This issue is really resolved now." and then try to click on submit button and then check, if that does not work I will mark the ticket resolved from this end.

#2624559

Did not work... Pls mark as resolved. Many thanks Minesh!

#2624643

Minesh
Supporter

Languages: English (English )

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

This issue is resolved by user.