# How to use the Liquid Block in "Featured collection - blocks" Section to Add Custom Review Apps

When customizing your Featured Collection - Blocks section in Design Packs, you may want to integrate third-party review apps or custom code that requires product-specific information. The Liquid block provides a powerful way to accomplish this. Let's explore how to use it effectively.

### Understanding the Liquid Block in Featured Collection - Blocks

The Liquid block allows you to insert custom HTML, JavaScript, and Liquid code into your product cards. One of its most powerful features is the ability to access product data through special placeholders.

#### Available Product Placeholders

The Featured Collection - Blocks section's Liquid block supports several product-specific placeholders:

* \[\[ product.id ]] - The product's unique identifier
* \[\[ product.handle ]] - The product's handle/URL slug
* \[\[ product.url ]] - The full product URL
* \[\[ product.description ]] - The product description
* \[\[ product.metafields.reviews.rating\_count ]] - Review count metafield
* \[\[ product.metafields.reviews.rating.value ]] - Review rating metafield

### Adding Review Apps

#### Example 1: JudgeMe Reviews

Here's how to add JudgeMe review stars to your product cards:

* In your Featured Collection - Blocks section, add a new block
* Select "Liquid/HTML" as the block type
* Insert this code:

```liquid
<div class="jdgm-preview-badge" data-id="[[ product.id ]]">
  <script type="text/javascript" src="https://cdn.judge.me/badges/{{shop.metafields.judgeme.shop_domain}}.js" async></script>
</div>
```

#### Example 2: Loox Reviews

To add Loox review stars:

```liquid
<div class="loox-rating" data-id="[[ product.id ]]" data-rating="[[ product.metafields.loox.avg_rating ]]" data-raters="[[ product.metafields.loox.num_reviews ]]">
  <script type="text/javascript" src="//loox.io/widget/loox.js" async></script>
</div>
```

### Best Practices for Featured Collection - Blocks

* Block Ordering: Place review blocks after the product title but before the price for optimal visual hierarchy
* Mobile Optimization: Test how your review displays look on mobile devices, as the Featured Collection - Blocks section can display differently on smaller screens
* Performance: Consider using the section's built-in lazy loading for optimal performance
* Styling: Use the section's custom CSS settings to style your review elements consistently with your theme

### Troubleshooting Common Issues

If your implementation isn't working:

* Verify that the app is properly installed on your store
* Check that you're using the correct placeholder syntax (\[\[ ]] not {{ }})
* Ensure any required metafields are properly set up
* Verify the block order in your section settings

### Advanced Usage

You can combine multiple placeholders and add conditional logic to create more sophisticated displays:

```liquid
{% if [[ product.metafields.reviews.rating_count ]] > 0 %}
  <div class="custom-reviews" style="margin: 10px 0;">
    <span class="rating">[[ product.metafields.reviews.rating.value ]]★</span>
    <span class="count">([[ product.metafields.reviews.rating_count ]] reviews)</span>
  </div>
{% endif %}
```

### Styling Tips

The Featured Collection - Blocks section provides two Custom CSS fields under the "Advanced" settings:

* CSS: Applied across all screen sizes
* Mobile CSS: Applied only on screens smaller than 480px

#### Adding Custom CSS

* Navigate to your section settings
* Scroll down to "Advanced"
* Find the "CSS" field
* Add your styles using this format:

```css
.custom-reviews {
  font-size: 0.9em;
  color: #666;
}

.rating {
  color: #f8b400;
  font-weight: bold;
}

.count {
  margin-left: 5px;
}
```

#### Mobile-Specific Styling

To add styles that only apply to mobile devices:

1. Find the "Mobile CSS" field under "Advanced"
2. Add your mobile-specific styles:

```css
.custom-reviews {
  font-size: 0.8em;
}

.rating {
  display: block;
  margin-bottom: 2px;
}
```

#### Important Notes:

* Each CSS declaration must end with a semicolon (;)
* The Mobile CSS will override the main CSS for screens smaller than 480px
* Keep your selectors simple to ensure they work properly
* Test your styles across different screen sizes to ensure proper display

By utilizing both CSS fields, you can create responsive, well-styled review displays that look great on all devices.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://design-packs.gitbook.io/docs/fundamentals/section-tutorials/featured-collection-blocks/how-to-use-the-liquid-block-in-featured-collection-blocks-section-to-add-custom-review-apps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
