Removing Anchor From Star Rating on Product Pages (Legacy)
Removing Anchor From Star Rating on Product Pages (Legacy)
Article summary
Did you find this summary helpful?
Thank you for your feedback
By default, the Star Rating behaves as an anchor to the Reviews Widget on Product Pages.
In order to disable this behavior, add the following style attribute to the Star Rating element's HTML code that is implemented in your store:
style="pointer-events: none;"
Example (Shopify)
Important:
If your store runs on another eCommerce platform, you would need to change the '{{ product.id }}' variable with the correct one to pull the product ID from your store's database.
That's what the star rating's code looks like before the change:
<div class="yotpo bottomLine"
data-product-id="{{ product.id }}">
</div>
That's how the star rating's code looks like after adding the style attribute:
<div class="yotpo bottomLine" style="pointer-events: none;"
data-product-id="{{ product.id }}">
</div>
Was this article helpful?