Skip Navigation

[Resolved] How to conditionally display view in page template only if view is not empty

This support ticket is created 6 years, 6 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#919684

Tell us what you are trying to do?
Hi I am wanting to make a series of views that I have set up to be displayed on the following service page template to be displayed only if there are posts that match this view. In the following example, it would show the title and posts under Our Programmes but would not show title or any other info for Upcoming Courses & Events, Our News or Our Resources unless content was posted?
hidden link

Is there any documentation that you are following?
No

Is there a similar example that we can see?
No

What is the link to your site?
hidden link

#919938

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pete,

Thank you for contacting our support forum.

You can actually delete the "No Results Found" text from the view itself and this will display Nothing if the view is empty.

Thanks,
Shane

#920069
Screen Shot 2018-07-03 at 9.02.50 AM.png

Thanks Shane, this would work, however, I would also like to hide the view titles that I have put in place on the template? I have uploaded a screenshot to help demonstrate what I want to hide when no view content.

#920352

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pete,

This screenshot is from a Content template?