Skip to content

Results Ranking embed

The Dynasort Results Ranking app embed re-ranks your theme’s own search results page. Your theme keeps everything it already does on that page: its grid, its product cards, filters, the sort menu, pagination or infinite scroll. Dynasort changes only one thing, the order of the products, using your active search recipe.

It is the alternative to the Dynasort Search Results app block described in Search Re-ranking:

  • Dynasort Search Results app block: replaces your theme’s results section with Dynasort’s grid, styled by the display settings on the Search page (swatches, badges, savings note, price visibility).
  • Dynasort Results Ranking embed: keeps your theme’s results section and cards, and only reorders them.

Choose the embed when your theme’s results page is already the way you want it, for example custom cards, filters or quick-add buttons. Use one or the other on the search template, not both.

  1. A shopper searches. Shopify decides which products match, exactly as before.
  2. Dynasort collects the theme’s first few result pages (the Pages to rank setting). Page 1 comes from the page itself; the following pages are fetched from your theme in the background, so every card is the theme’s own markup.
  3. The pooled cards are put in your search recipe’s order and shown together at the top of the results.
  4. The theme’s next page link or infinite scroll continues from the first page after the pool, in Shopify’s order, so no product appears twice.

Products your recipe would hide, such as sold-out items when the recipe hides them, and products Dynasort has not synced yet, are placed after the ranked products in the theme’s original order. Nothing the theme returned is removed.

Ranking applies on the search page when there is a query, the shopper is on the first page, and results are sorted by relevance (the default). If a shopper chooses a different sort, such as price, the theme’s sort is left exactly as it is. Switching back to relevance ranks the grid again.

Filters keep working: when a shopper applies a filter, the theme re-renders the grid and Dynasort puts the filtered results in the same recipe order.

The grid stays invisible for a moment while it is ranked, so shoppers never see the theme’s order and then a jump. If the ranking does not arrive in time, or the request fails, the theme’s original order is shown instead. A late answer never reorders a grid shoppers can already see.

To keep that moment short, Dynasort precomputes the order for your store’s most searched queries and publishes it to your store every two hours. The results page carries that order with it, so for common searches the first page is ranked almost instantly, without any extra request. Other queries are ranked on request, and a shopper repeating a search in the same browser gets their recent order back at once.

  1. Make sure a search recipe is active on the Search page in the Dynasort app (see Search Re-ranking).
  2. In the theme editor, go to Theme settings → App embeds and turn on Dynasort Results Ranking.
  3. Fill in the selectors for your theme (see below), save, and run a search on your storefront.

If you previously added the Dynasort Search Results app block to the search template, remove it and show your theme’s own results section again.

SettingWhat it does
Results grid selectorThe outer list that holds the theme’s result cards. Required; without it the embed does nothing.
Result card selectorOne result inside that grid. Defaults to li.
Next page link selectorThe theme’s next page or load more link. Dynasort points it past the ranked pages so nothing repeats, or removes it when the pool already holds every result.
Card image box selector (optional)For themes that size card images per page. Matches the image heights of the pooled pages to page 1, so the grid stays even.
SpeedExact (default): rank all pooled pages, then show, so the best result from any pooled page can lead. Fast: show page 1 ranked as soon as the ranking arrives, then add the rest of the pool, ranked, below it.
Pages to rankHow many of the theme’s result pages are pooled and ranked together, from 1 to 6. Default 4. Results past these pages keep Shopify’s order.

Exact gives the recipe the most freedom: a strong product on page 3 can move to the first position. Fast shows the first results sooner, but a product from a later page can rank no higher than the first row after page 1. If your theme’s result pages load slowly, Fast is the safer choice.

ThemeResults gridResult cardNext page linkCard image box
Enterprise#filter-results > ul[role="list"].js-pagination-result.js-pagination-load-more.card__media .media[style*="padding-top"]

On Enterprise, the > in the grid selector matters: product cards carry their own lists (image sliders, swatches) with the same role="list", and only the direct child of #filter-results is the results grid.

This table grows as we verify more themes. If your theme is not listed, email us at hello@dynasort.io with your theme’s name.

  1. On your storefront, run a search that returns more than one page of results.
  2. Right-click a product card and choose Inspect.
  3. Walk up from the highlighted element to the card itself (often an <li>). Note its class: that is your result card selector.
  4. Walk up one more level to the element that directly contains all the cards. Note its id or class: that is your results grid selector. If cards contain their own lists, use > to select only the direct child, as in the Enterprise example.
  5. Scroll to the bottom of the results and inspect the next page or load more link: that is your next page link selector.

Each ranked results page is recorded as a serve, and clicks on the ranked cards are recorded with their position, the same way as the Dynasort Search Results app block. The numbers appear on the search recipe’s page. See Measuring results.

  • The order never changes: the results grid selector does not match the rendered page, or no search recipe is active. Re-check the grid selector in the inspector after running a search.
  • Some results appear twice: the next page link selector does not match, so the theme loads page 2 again after the pool. Set it to the theme’s next page or load more link.
  • Card images have uneven heights: your theme sizes images per page. Set the card image box selector.
  • A price sort is not re-ranked: that is by design. Ranking applies only to relevance sort, so a shopper’s own sort choice is always respected.

Frequently asked questions

What does the Dynasort Results Ranking embed do?

It re-ranks your theme's own search results page. The theme keeps its grid, cards, filters, sort menu and pagination; Dynasort collects the theme's first few pages of result cards and puts them in the order of your active search recipe.

How is it different from the Dynasort Search Results app block?

The app block replaces the theme's results section with a Dynasort grid, styled by the Search page's display settings. The Results Ranking embed keeps the theme's own results section and its cards, and only changes the order. Use one or the other on the search template, not both.

When does the embed re-rank results?

On the search page when there is a query and results are sorted by relevance, which is the default. If a shopper picks another sort, such as price, the theme's sort is left alone.

What does Pages to rank control?

How many of the theme's result pages are pooled and ranked together, from 1 to 6, default 4. Results past those pages keep Shopify's order, and the theme's next page or infinite scroll continues from the first page after the pool, so nothing repeats.

What is the difference between the Exact and Fast speed settings?

Exact waits for all pooled pages, then shows them in recipe order, so the best result from any pooled page can lead. Fast shows the first page in recipe order as soon as the ranking arrives and adds the rest of the pool, ranked, below it.

Will shoppers see the results jump or flicker?

No. The grid stays invisible for a moment while it is ranked. If the ranking takes too long or fails, the theme's original order is shown instead, and a late answer never reorders a grid shoppers can already see.

Why is ranking almost instant for common searches?

Dynasort precomputes the order for your store's most searched queries and publishes it to your store every two hours, so the page can carry the order with it and no extra request is needed. Other queries are ranked on request.

Do filters still work?

Yes. When a shopper applies a filter, the theme re-renders the grid and Dynasort puts the filtered results in the same recipe order.

Which selectors does the Enterprise theme use?

Results grid selector: #filter-results > ul[role="list"]. Result card selector: .js-pagination-result. Next page link selector: .js-pagination-load-more. Card image box selector: .card__media .media[style*="padding-top"].