Website Building » Squarespace » How Do I Add a Star Rating on Squarespace?

How Do I Add a Star Rating on Squarespace?

Last updated on December 23, 2022 @ 1:21 pm

Adding a star rating on Squarespace is a great way to add an extra layer of interactivity and engagement to your website. Here’s how to do it:

PRO TIP: If you are planning on adding a star rating to your Squarespace website, be aware that there is currently no built-in functionality to do so. However, there are some workaround methods that you can use, such as embedding a third-party widget or using HTML and CSS code. Keep in mind that these workarounds may not be supported by Squarespace and could cause problems with your site down the line. Proceed at your own risk!
  1. First, create a new page or post on your Squarespace site.
  2. In the body of your page or post, type the following code:
    <nowiki><div class="sqs-block-content"><p><b>5 stars</b></p>
    </div></nowiki>
    .
    This will create a basic 5 star rating system.
  3. Next, style the rating system using HTML. For example, you could make the stars yellow by adding the following code:
    <nowiki><style>.sqs-block-content {color: yellow;}</style></nowiki>.

    You can also use CSS to style the rating system further.

  4. Finally, add some interactivity to the rating system by allowing users to click on the stars to rate something. To do this, add the following code:
    <nowiki><script type="text/javascript">$('.sqs-block-content').on('click', '.star', function(e){ // your code here });</script></nowiki>. This will add a click event to each star that will allow you to run some custom code when clicked.

That’s all there is to it! By following these steps, you can easily add a star rating system to your Squarespace site.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.