Passer la navigation

[Résolu] Hide map if no location added?

This support ticket is created Il y a 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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 2 years, 5 months.

Assisté par: Minesh.

Auteur
Publications
#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: lien caché. 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: lien caché. 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
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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/