Hide products in all collection

Hide products in all collection

Add this code in main-collection-product-grid.liquid:

Idea

{% for product in collection.products %}

  {% unless product.metafields.seo.hidden.value == 1 %}

    {% render 'product-card', product: product %}

  {% endunless %}

{% endfor %}


    • Related Articles

    • Hide products from Google & Shopify Search

      1. Access Your Shopify Admin Log in to your account to enter the backend of your store. Familiarize yourself with the intuitive Shopify admin page and interface, setting the stage for effortless product management. Think of it as your store's control ...
    • Make mega menu show only collection that consist of products

      In header-mega-menu.liquid and header-drawer.liquid, add the followings: {%- if childlink.object and childlink.object.products_count == 0 -%} {%- continue -%} {%- endif -%} and {%- if grandchildlink.object and grandchildlink.object.products_count == ...
    • Hide collection with 0 products in mega menu list

      In mega-menu-list.liquid, add the followings: {% for childLink in link.links %} {% if childLink.object.products_count > 0 %} {% assign break_after_modulo = forloop.index | modulo: links_before_wrap %} <li {% if break_after_modulo == 0 and ...
    • Hide collection card with 0 product in collection list

      In collectionlist.liquid, add {% capture list_items %} {% for collection in section_collections limit: max_items %} {% if collection.products_count > 0 %} <div class="resource-list__item"> {% content_for 'block', type: '_collection-card', id: ...
    • Remove/hide Sold out Badge for out of stock Products

      In base.css file, add this code at the bottom: .grid__item .card-wrapper:has(.price--sold-out) .card--media .card__badge { display: none !important; }