> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/faqs/more/my-infinite-scrolling-doesnt-show-all-of-my-products..md).

# My infinite scrolling doesn't show all of my products.

## Background

In general, collections with infinite scrolling work like this:

1. The page loads with the first set of products, from page 1.
2. The user scrolls down to the end, your shop loads page 2 in the background, and then inserts the products from page 2 after all of the products already on the screen.
3. Repeat step 2, for each additional page available.
4. When the next page, loaded in the background, is found to have *no* products on it, your shop stops trying to load additional pages.

With Locksmith, Step 4 is where things get interesting.

Product hiding is a frequently-used feature of Locksmith - it allows you to mix your protected and unprotected products in the same collection, ensuring that your customers see *only* the products they *should* see.

A side-effect of this is that each page of your collection *may not* be "full". For example, if your page size is 10, a user that is authorized to see *everything* will see 10 products on page 1, but a user who's only authorized to see 5 products *will only see 5 products*, even if page 2 has more products available.

(We have a whole article about this here:[ Improving collection filtering](/faqs/faq-i-see-blank-spaces-in-my-collections-and-or-searches-when-locking.md).)

Now, imagine that you have a collection for which the user can see 10 products on page 1, 10 products on page 2, *zero* products on page 3, and another 10 products on page 4. This might be annoying *without* infinite scrolling, but *with* infinite scrolling it becomes impossible for the user to reach the last set of products. Remember: in step 4 of the infinite scrolling process, when an empty page is encountered, the shop stops trying to load more products.

## Solutions

1. Increase the page size (usually configurable in your theme settings), so that there are never any empty pages of products. It's much easier to accidentally have an empty page if each page is limited to a small number of products, and much harder to have that happen if you use the maximum page size of 50.
2. Or, hire a theme developer to alter the infinite scrolling code for your theme, so that it only stops trying to load more products after encountering *several* empty pages, instead of after only encountering one.

## Notes

* This doesn't apply to server keys (e.g. passcodes, secret links). In most cases, infinite scrolling *will not* work with these keys. If it doesn't work in your theme, there is no workaround, short of disabling infinite scrolling, or going with a new theme entirely.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.locksmith.guide/faqs/more/my-infinite-scrolling-doesnt-show-all-of-my-products..md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
