To hide the “No Items Found” empty state from a second multi-image gallery on specific pages in Webflow, you’ll need to conditionally style or remove that element using Webflow’s visibility settings or custom code.
Note: Conditional visibility only works with CMS-bound elements within a Collection List.
<style>
body.slug-name .second-gallery-class .w-dyn-empty {
display: none;
}
</style>
slug-name with the specific page slug, and second-gallery-class with the class applied to the outer container of your second gallery..w-dyn-empty is Webflow’s default class for “No Items Found”.
<script>
document.addEventListener("DOMContentLoaded", function() {
if (window.location.pathname.includes("your-page-slug")) {
var emptyState = document.querySelector('.second-gallery-class .w-dyn-empty');
if (emptyState) {
emptyState.style.display = 'none';
}
}
});
</script>
To hide the “No Items Found” message for a second multi-image gallery on certain pages, use Conditional Visibility if working with CMS content, or add page-specific CSS or JavaScript in Page Settings → Custom Code. Always use unique classes to precisely target the second gallery.