Endre antall produkter som vises på samlingssider

Du kan endre antall produkter som vises på samlingssidene dine, enten ved å gjøre endringer i temainnstillingene i temaredigeringsprogrammet, eller ved å redigere temakoden. Du kan vise så mange produkter du ønsker, så lenge du ikke overstiger Shopifys grense på 50 produkter per side.

Kontroller temainnstillingene

  1. Gå til temaredigeringsprogrammet før du gjør endringer i temakoden.

  2. Fra rullegardinmenyen øverst på siden, eller fra Maler-menyen på mobil, velger du Samlingssider.

  3. Klikk på Samlingssider eller Samling.

  4. Hvis temaet ditt har tilgjengelige innstillinger for å endre antall produkter som vises på samlingssider, justerer du innstillingene slik at de passer dine behov.

  5. Klikk på Lagre.

Hvis temaet ditt ikke har innstillinger for å endre antall produkter som vises per side, eller hvis innstillingene finnes, men er for begrenset for endringene du vil gjøre, må du følge de neste stegene for å redigere temakoden.

Oppdater collection-template.liquid-filen

  1. I Deler-katalogen klikker du på collection-template.liquid.

  2. Finn følgende kode i koderedigeringsprogrammet:

 {% paginate collection.products by 9 %}
In the above example, the default number of products per page is 9. This number varies theme to theme. You will need to change this number to the number of products that you'd like to show on your collection pages. Use any number you like, as long as it is not more than 50.

Some themes use a variable called `limit` instead of a number to determine how many products will be shown per page. If your theme uses a `limit` variable, the code will look like this:
 {% paginate collection.products by limit %}
If your theme uses a `limit` variable, you will need to replace `limit` with a number. As above, this is the number of products that will show on each collection page, and the number must not be more than 50. Note that replacing the limit variable with a number will remove the ability to make changes to the collection pages [pagination](https://shopify.dev/themes/architecture/templates/collection) settings in the theme editor. We recommend that you not edit your theme code unless you are unable to achieve the desired number of products per page in the [theme editor](https://www.shopify.com/admin/themes/current/editor).
  1. Klikk på Lagre.

Oppdater collection.liquid-filen

  1. I Maler -katalogen klikker du på collection.liquid.

  2. Finn følgende kode i koderedigeringsprogrammet:

 {% paginate collection.products by 9 %}
In the above example, the default number of products per page is 9. This number varies theme to theme. You will need to change this number to the number of products that you'd like to show on your collection pages. Use any number you like, as long as it is not more than 50.

Some themes use a variable called `limit` instead of a number to determine how many products will be shown per page. If your theme uses a `limit` variable, the code will look like this:
 {% paginate collection.products by limit %}
If your theme uses a `limit` variable, you will need to replace `limit` with a number. As above, this is the number of products that will show on each collection page, and the number must not be more than 50. Note that replacing the limit variable with a number will remove the ability to make changes to the collection pages [pagination](https://shopify.dev/api/liquid/tags/theme-tags#paginate) settings from the theme editor. We recommend that you not edit your theme code unless you are unable to achieve the desired number of products per page from the [theme editor](https://www.shopify.com/admin/themes/current/editor).
  1. Klikk på Lagre.

Er du klar til å begynne å selge med Shopify?

Prøv det gratis