Targeting your product grid
Filters updates one region of the page rather than reloading it, so it has to know which region holds your products. By default it looks for the SureCart product list. If your grid comes from a page builder or a custom template, tell Filters where it is.
Pointing at your own grid
Give results_target the CSS selector of the element that wraps all of your products - the container, not one card.
[ivasure results_target=".my-own-grid"]
- The targeted container. Filters replaced what is inside it and left the rest of the page alone.
Choosing the right selector
- Wrap all the products, not each one. A selector matching every card gives Filters nothing to replace.
- Prefer a class you control over one your theme generates. Generated class names change when the theme updates, and your filter stops working with no error.
- If several elements match, the first is used. Make it unique.
When the grid still does not update
If the target is right and the products still do not change, the grid is probably rendering in a way Filters cannot swap in place. Switch that placement to the document fetch mode, which re-fetches the page and swaps the region from the response:
[ivasure results_target=".my-own-grid" results_fetch_mode="document"]It is slightly slower than the default because it fetches the whole document, but it works with grids that nothing else can reach - which is why it exists.
Was this page helpful?