Skip Navigation

[Resolved] Force a View to display nothing (or be invisible) when no results found

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to disable the wrapper div around their view.

Solution:

You can completely removing this div by enabling this setting "Disable the wrapping DIV around the View".

However it should be noted that you can disable this DIV, but you will not be able to use some of the functionality that Views offer such as AJAX updates and Pagination.

This support ticket is created 5 years, 8 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 4 replies, has 2 voices.

Last updated by Ben 5 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1212742

Ben

Is there a way to make a View display absolutely nothing when no results have been found?

Currently I find that a View which has no results still occupies a small area or line.

I hope this makes sense. I am happy to clarify what I mean if needed.

#1212802

Shane
Supporter

Languages: English (English )

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

Hi Ben,

To display absolutely nothing, you can remove the "No Results Found" text from the view.

As this is the only thing that is displayed.

I know that the wrapper divs will still be there.

Thanks,
Shane

#1213222

Ben

Hello Shane!

I have done this but removing the wrapper divs was what I was talking about in the initial post. My apologies for not explaining it correctly.

Is there a way to fully remove these?

#1213240

Shane
Supporter

Languages: English (English )

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

Hi Ben,

You can completely removing this div by enabling this setting "Disable the wrapping DIV around the View".

However it should be noted that you can disable this DIV, but you will not be able to use some of the functionality that Views offer such as AJAX updates and Pagination.

Thanks,
Shane

#1213261

Ben

Thank you Shane! This has worked perfectly.