Navigation überspringen

[Gelöst] Hide map if no location added?

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

Zeitzone des Unterstützers: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 1 reply, hat 2 Stimmen.

Zuletzt aktualisiert von Minesh vor 2 years, 5 months.

Assistiert von: Minesh.

Author
Artikel
#2674545

Tell us what you are trying to do?
Hello, for this location in our directory, the owner does not want their actual address or a map to their property visible: versteckter Link. However, if I do not enter an address, the map appears somewhere over Africa.

Is there any documentation that you are following?
Looked in docs and googled the topic.

Is there a similar example that we can see?
All other entries have maps and locations listed. Like this: versteckter Link. We want to keep this for those. But is there an option so that if an address is not input, the map does not appear?

Thank you.

#2674595

Minesh
Unterstützer

Sprachen: Englisch (English )

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

Hello. Thank you for contacting the Toolset support.

What if you display that map conditionally based on your address field value.

You should wrap the map block with the conditional block and only display the map when the address field value is not empty.

Please check the following doc:
- https://toolset.com/course-lesson/using-toolset-conditional-block/
- https://toolset.com/2021/08/5-advanced-uses-of-toolsets-conditional-block-in-wordpress/