Bricks Boilerplate Documentation
PricingDemo
  • Intro
  • Getting Started
    • Requirements
    • 5 minutes launch ⚡
    • Import into an existing project
  • Basics
    • Inside the package
    • Global Styles
      • General
      • CSS Variables
      • Buttons
      • Utility classes
    • Templates
    • ACF
      • Global topbar
    • Bricks Boilerplate Addon plugin
      • Wishlist
      • Variation swatches
      • Checkout
    • Code snippets
  • Tutorials
    • Blog in 5 minutes
    • Custom Off-canvas cart
    • Off-canvas cart without addon plugin
    • Custom Thank you page
    • Custom Checkout page
    • Custom Cart page
    • My account page
    • Product gallery with thumbnails
    • Custom query for product reviews
  • Advanced
    • Custom slider controls
    • Custom accordions
    • Megamenu
    • GSAP animations
  • Common issues
    • Custom CSS
    • Product galleries
    • Restoring site with WPvivid
Powered by GitBook
On this page
  1. Tutorials

Custom query for product reviews

PreviousProduct gallery with thumbnailsNextCustom slider controls

Last updated 4 months ago

Bricks Boilerplate offers 2 snippets that you can use to query woocommerce 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":

  4. Build your layout and insert dynamic tags.

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":

  4. Build your layout and insert dynamic tags.

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