Shopify Reviews App: Add to homepage featured product section
This modification allows you to add Shopify Reviews to any Featured product on the homepage. The reviews will be located below the product image and thumbnails to help promote the product's reviews. You'll need to have the Shopify Reviews app already installed.
Example of homepage section:
How to:
- 1
-
Create a new Snippet file
Open your Code Editor.
From your list of themes, find the Actions link for the theme you'd like to edit. Then select Edit code. Example draft theme:
Example if you're working from your main live/published theme:
Quick link if the theme is live/published:
Open Code Editor
In the Snippets folder, choose Add a new section:
Call the section:
product-index-reviews
Example:
Use the Create section button to complete.
Next, use all the code from one of these files and paste into your new Snippet:
Option 1: Reviews centred
Or
Option 2: Reviews left aligned
Save the file after replace code.
Example centred version:
Example left aligned version:
- 2
-
Create a new section file
In the Sections folder, choose Add a new section:
Call the section:
index-product-reviews
Example:
Use the Create section button to complete.
Erase all the default code that generated:
Replace the default code with all the code from this file:
Save the file after replace code.
- 3
-
Add the new section in the Theme Editor
While still in the Code Editor, use Customize on the top right:
Once in the Theme Editor - Under Sections:
Choose Add section:
Add the new section under Products:
Add that section and choose your product.
Result:
The reviews will be underneath the main product image and product image thumbnails (1) and tabs will be placed below the product reviews (2):