How can I hide a The Grid element if the grid is empty?

Hi,

I am developing a website in Pro and I have a template page with a TheGrid element.
Currently, if the grid is empty (as not populated) it gives a message

“No post was found with your current grid settings. You should verify if you have posts inside the current selected post type(s) and if the meta key filter is not too much restrictive.”

I would prefer that the grid entry or row became a display:none

How would I achieve this please?

Ok I found a possible workaround, although I am open to a better solution

.tg-error-msg { display:none; }

Hi There @scotbaston

Thanks for writing in! I have checked the solution that you have implemented and it is working fine.

Or else you can try excluding specific posts from your grid. Please refer to the documentation here (https://theme-one.com/docs/the-grid/#source_settings).

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.