Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I would like to hide star ratings for products that have no reviews. I'm using the Dawn theme and Stamped review app.
I've Googled the topic and tried inserting some code, but none are working for me.
Thanks in advance.
To hide star ratings for products with no reviews, you’ll need to add a conditional block to your theme where the star ratings are displayed. This requires basic developer skills.
Find the part of your theme files where the star ratings are coded.
Typically, it’s in a product-related file such as product-card.liquid, product-grid-item.liquid
Update the code to display star ratings only if the product has reviews. Use Stamped’s review data, such as review count or average rating.
Here’s an example of what the code might look like:
{% if product.stamped_reviews_count > 0 %}
<div class="stamped-stars">
⭐️⭐️⭐️⭐️⭐️
</div>
{% endif %}
❗️Make sure you’re using the right data from Stamped. Check their documentation or contact their support if needed.