Skip Navigation

[Resolved] Split: default marker on a map when there are no results

This support ticket is created 4 years, 2 months ago. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 4 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1865423

Seems like that fixed the problem, thanks. Now I just wish I could insert a taxonomy view into the block editor.

Also, can you think of a way to only show one marker when you have multiple views on a page that all return no results? We have 2 lists of items that are currently empty, and the client wants to show a default map image when this happens. Problem is, since there are 2 views, there are 2 'empty' markers on the page, and I need it to be one for the plugin to show the default.

#1865655

Nigel
Supporter

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

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

Hi Shawn

You can insert a taxonomy View into the block editor, but not using View block. Try just inserting the shortcode for the View using a Shortcode block, or use a Classic Block and the little Fields and Views button to insert the View via shortcode.

I'm not sure I quite follow your question.

I suspect you are going to want to conditionally display a simple map when there are no results from either View (or show the intended map when there are results from either View), but you'll likely need to write a custom function or shortcode to use in the condition which effectively replicates the View queries to see whether they have any results or not and return a truthy or falsey value (1 or 0) according to which map should display.

If I've misunderstood, please clarify.

#1865711

Right, I was talking about using a View Block. Do you know if that capability is coming?

As for the multi-view puzzle, I think I understand what you're saying. I'll look into it.

Thanks again!

#1865721

Nigel
Supporter

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

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

Coming? Yes. But not anytime soon. We have the next 3 dev cycles pretty much worked out, and it isn't included in those, and beyond that we can't commit to anything as we'll evaluate what to work on nearer the time.