# Custom query for product reviews

Bricks Boilerplate offers 2 snippets that you can use to query woocommerce product reviews:

{% tabs %}
{% tab title="Query all product reviews" %}
Find the snippet in your account in download area or in the Snippet page (for logged in users only). This snippet will allow you to query all reviews of all products.

1. Copy the code and Paste it inside Code Snippet plugin or similar, then Activate it.
2. On any page or template, Add a Div or Block that will act like a list wrapper.
3. Inside this element add a Div or Block and toggle on the query loop option. Now select query type "All product reviews":\
   &#x20;![](/files/QsBw9jINCTk21mP3wQJu)
4. Build your layout and insert dynamic tags.

{% endtab %}

{% tab title="Query reviews of specific products" %}
Find the snippet in your account in download area or in the Snippet page (for logged in users only). This snippet will allow you to query all reviews of specific product - you need to build this inside PRODUCT SINGLE TEMPLATE.

1. Copy the code and Paste it inside Code Snippet plugin or similar, then Activate it.
2. In **product single template**, Add a Div or Block that will act like a list wrapper.
3. Inside this element add a Div or Block and toggle on the query loop option. Now select query type "Single product reviews":\
   ![](/files/N2xoWURzcbCHMIfDdi6T)\
   &#x20;
4. Build your layout and insert dynamic tags.

{% endtab %}
{% endtabs %}

#### Dynamic tags list

{brt\_product\_review\_author\_name} - get author name

{brt\_product\_review\_date} - review date

{brt\_product\_review\_comment\_text} - comment content

{brt\_product\_review\_rating} - show review rating (stars)

{brt\_product\_review\_author\_email} - author email

{brt\_product\_review\_author\_avatar} - author avatar

{brt\_product\_review\_author\_billing\_address} - author address (if he/she has account)

{brt\_product\_review\_author\_billing\_city} - author city

{brt\_product\_review\_author\_billing\_state} - author state

{brt\_product\_review\_author\_billing\_country} - author country


---

# 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://docs.brickstheme.com/tutorials/custom-query-for-product-reviews.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.
