How to Add Pagination at Shopify Collection Page

Step 1: Access the Theme Code

  1. Log in to your Shopify admin panel.
  2. Navigate to Online Store > Themes.
  3. Find your active theme (e.g., Dawn), click on Actions, then Edit code.

Step 2: Modify the Collection Template

  1. In the Sections directory, open the main-collection-product-grid.liquid file (or similar file that handles the collection product grid).

Step 3: Add Pagination HTML

Locate the part of the code where the products are being looped through and displayed. Below this loop, add the pagination HTML. Here’s an example of what the modified main-collection-product-grid.liquid might look like:

Step 4: Add CSS for Styling the Pagination

Add CSS to style the pagination. You can add this to your base.css or theme.css file.

Step 5: Add JavaScript for Smooth Scrolling (Optional)

If you want smooth scrolling to the top when clicking pagination links, add the following JavaScript to your theme’s JavaScript file, usually located in the assets directory.

Step 6: Save and Test

  1. Save all your changes.
  2. Go to your collection page on your Shopify store and test the pagination links to ensure they work correctly.

Summary

By following these steps, you can add pagination to your Shopify collection pages in the Dawn theme:

  1. Modify the collection template to include pagination HTML.
  2. Add CSS for styling the pagination links.
  3. Optionally, add JavaScript for smooth scrolling.

This enhances the user experience by allowing customers to navigate through multiple pages of products easily.

Leave a Reply

Your email address will not be published. Required fields are marked *