I was having the same question and found the solution here:
https://drupal.stackexchange.com/questions/2321/hide-a-view-if-less-than...Add this to template.php:
function MY_THEME_NAME_preprocess_views_view(&$vars) { if ($vars['display_id'] == 'MY_DISPLAY_ID' && count($vars['view']->result) < 2) { $vars['view']->result = NULL; } }
and replace "MY_THEME_NAME" by your actual theme name and "MY_DISPLAY_ID" by a unique views ID (your can specify it in the advanced settings of your view). You can also custom the number of elements to determine when to hide the view
- Status changed to Fixed
8 months ago 5:33pm 7 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.