How hidden content rules work
Each rule has:- A resource type — the kind of item the rule targets. Select Product, Page, or Article.
- A surface — the customer-facing area the rule applies to. Products support Search, Collections, and Recommendation blocks. Pages and articles support Search and Recommendation blocks only, because they don’t appear on collection pages.
- Conditions — a filter group that selects the items to hide. Products use catalog attributes; pages and articles use a fixed set of content fields plus any metafields you reference.
- An enabled toggle — turn the rule on to apply it, or leave it as a draft while you configure conditions.
Hidden content rules affect discovery only. Items remain published, addressable by handle, and available at their storefront URL. To also block direct access, unpublish or archive the item in Shopify.
Surfaces
Select one surface per rule. Create separate rules if you need to hide the same items from more than one surface. Search hides matching items from search results and autocomplete suggestions. Available for products, pages, and articles. Collections hides matching products from collection (browse) pages. Available for products only. Recommendation blocks hides matching items from recommendation and content blocks rendered outside of search and browse. Available for products, pages, and articles. Because each rule targets exactly one surface, you can hide an item from search while keeping it visible in a hand-curated block, or the other way around. Search and blocks eligibility are independent.Conditions
Conditions are built with the same query-builder used elsewhere in the dashboard. You can combine any number of rules with AND / OR logic.Product conditions
Product rules can filter on anything you can filter a merchandising rule on. Common examples:- Attribute matching: hide products where
product_typeequalsAccessory, or where a tag list containsinternal. - Availability: hide products where
inventory_quantityis0from recommendation blocks so out-of-stock items stop appearing in “you might also like.” - Price bounds: hide products with a price below a minimum from search to keep sample or placeholder listings out of results.
- Vendor or brand exclusions: hide products from a specific vendor from a single surface while leaving them discoverable elsewhere.
Page and article conditions
Page rules expose a fixed set of fields:title, handle, and published_at. Article rules add tags, blog_handle, and author.
Metafield fields appear automatically. When you select Page or Article, Layers lists every metafield it has seen on that resource in your store as a metafields.<namespace>.<key> field. Each field is typed from the Shopify metafield definition: booleans render as a checkbox, numbers as a number input, dates as a date picker, and list.* metafields as multi-value. Metafields already used by a saved condition stay selectable even if no synced page or article currently carries them.
The recommended pattern is a boolean metafield you set in Shopify on the pages or articles you want to exclude:
- In Shopify, define a metafield on the page or article resource. For example,
layers.hide_from_searchwith type Boolean. - Set the metafield to
trueon the pages or articles you want to hide. - In Layers, create a hidden content rule for that resource type, target Search, and add a single condition
metafields.layers.hide_from_search = true. The field appears in the condition builder once at least one page or article has the metafield set.
sitemap.xml, while removing them from Layers surfaces. Shopify’s built-in Hide from search engines and sitemap setting (seo.hidden) removes the item from both. Use a metafield-driven hidden content rule when you only want to hide from Layers.
Preview
The rule editor includes a preview panel for product rules. Select a product from your catalog, and Layers evaluates the conditions currently in the editor against that product. The panel shows whether each condition matched and whether the rule would hide the product on the selected surface. Preview is not available for page or article rules.Creating a hidden content rule
- Open Configure → Hidden Resources in the dashboard.
- Click Create Rule.
- Give the rule a name and, optionally, a description.
- Under Applies to, select Product, Page, or Article.
- Select the surface the rule should apply to. The list is limited to surfaces the resource supports.
- Build the conditions that select the items to hide. For page or article rules, metafield fields appear automatically based on what has been synced.
- For product rules, use the preview panel to confirm the rule matches the products you expect.
- Toggle Enabled on when you’re ready to apply the rule. Draft rules stay saved but do not affect customer-facing results.
Managing rules
The Hidden Resources index page lists every rule with its name, status (Published or Draft), surface, and the resource it applies to. From the list you can:- Toggle a rule between enabled and disabled without editing it.
- Open a rule to edit its name, description, resource type, surface, or conditions.
- Delete a rule you no longer need.
Hidden content rules vs. request transforms
Both features can remove items from results, but they run at different times and are best suited to different use cases:- Hidden content rules are evaluated against your catalog and content before requests are served. They are the right choice when a set of items should always be hidden from a surface regardless of who is searching or what they typed. Because eligibility is precomputed, they have no per-request cost.
- Request transforms run at query time. They can inject filters, override sort orders, or otherwise mutate a request based on the shopper’s context: channel, geo, customer segment, or applied filters. Reach for a request transform when the items to hide depend on the request itself. Examples include hiding web-only products from mobile-app traffic, or hiding out-of-stock items only when the shopper sorts by “Best Sellers.”