Coding a private page & products

Topic summary

A user is attempting to add private pages and products to their website by following a YouTube tutorial but cannot locate the main-collection-product-grid.liquid file in their theme’s code section despite extensive searching.

Key Issue:

  • The tutorial requires modifying this specific file to implement private product functionality
  • The code involves filtering products based on a ‘private’ tag

Resolution:

  • Another user identified that main-collection-product-grid.liquid is specific to Shopify’s Dawn theme
  • The original poster likely uses a different theme, explaining why the file doesn’t exist in their codebase

Outcome:

  • The user acknowledged this makes sense, recognizing the tutorial’s theme-specific nature
  • They will need to either switch themes or find an alternative implementation method compatible with their current theme
Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

have been following a you tube clip to add a private page and private products to my website-

i have done half of the steps-

but i cannot find: main-collection-product-grid.liquid

i’ve searched it in code section i’ve searched for it manually , i just cant find it.

please help, why is is not showing?

this is what im trying to do-

Step 2: Update main-collection-product-grid.liquid File

Goto main-collection-product-grid.liquid file and replace the following code:

<li
                  class="grid__item{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
                  {% if settings.animations_reveal_on_scroll %}
                    data-cascade
                    style="--animation-order: {{ forloop.index }};"
                  {% endif %}
                >
                  {% render 'card-product',
                    card_product: product,
                    media_aspect_ratio: section.settings.image_ratio,
                    image_shape: section.settings.image_shape,
                    show_secondary_image: section.settings.show_secondary_image,
                    show_vendor: section.settings.show_vendor,
                    show_rating: section.settings.show_rating,
                    lazy_load: lazy_load,
                    show_quick_add: section.settings.enable_quick_add,
                    section_id: section.id
                  %}
                </li>

With below code:

Copy Code

{% assign isPrivateProduct = false %}
                {% for tag in product.tags %}
                  {% if tag == 'private' %}
                    {% assign isPrivateProduct = true %}
                  {% endif %}
                {% endfor %}

                {% if customer %}
                  <li
                    class="grid__item{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
                    {% if settings.animations_reveal_on_scroll %}
                      data-cascade
                      style="--animation-order: {{ forloop.index }};"
                    {% endif %}
                  >
                    {% render 'card-product',

help…

Hi
Are you using the same theme as your YouTube clip tutorial?
main-collection-product-grid.liquid is part of the dawn theme…

Oh probably not, that makes sense.
Dam it