Skip Navigation

[Resolved] Conditional display if view not empty

This support ticket is created 3 years, 3 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.

This topic contains 2 replies, has 2 voices.

Last updated by aurelieL 3 years, 3 months ago.

Author
Posts
#2484057

Tell us what you are trying to do?

I'm trying to display related posts in a view, but I want to hide the view if it is empty.

Is there any documentation that you are following?

This support ticket appears to have the answer I'm looking for, but the specific configuration of the conditional block is behind a hidden link.

https://toolset.com/forums/topic/conditional-display-of-a-view-if-it-is-not-empty/

What is the link to your site?

hidden link

#2484467

Nigel
Supporter

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

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

Hi there

I edited the links in the thread you shared so that the screenshots in this reply are visible: https://toolset.com/forums/topic/conditional-display-of-a-view-if-it-is-not-empty/#post-2330179

You are doing something similar to what is described in this documentation, to not show the output of a custom search View when it first loads until something has been searched for: https://toolset.com/course-lesson/creating-a-custom-search/#hide-the-search-results-until-the-first-search

But in your case where you are not using custom search you want to use the condition described by Minesh in that support thread, checking the number of results, which you can enter as shown in his screenshots through the normal UI.

#2484685

Your solution works great Nigel, thank you!