Skip Navigation

[Resolved] Hide map if no location added?

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 1 reply, has 2 voices.

Last updated by Minesh 1 year, 7 months ago.

Assisted by: Minesh.

Author
Posts
#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: hidden 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: hidden 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
Supporter

Languages: English (English )

Timezone: 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/