View Product Page

Shortcodes, widgets and blocks

The plugin includes shortcodes, widgets, and blocks that you can use on any page of your site.

1. Show all reviews (shortcode,widget and block)

Classic editor – To print all the reviews posted on your products, use the following shortcode.

[yith_ywar_show_reviews]

Block – To print all the reviews posted on your products, add the block Reviews to the page or widget.

Reviews block

Now leave the Product ID empty and enable/disable the following options as you need:

  • Reviews per page: select the number of reviews to show per page;
  • Enable pagination: enable to show the pagination;
  • Hide action buttons (Edit, Reply, Helpful, Report): enable if you don’t want to show the buttons in the review;
  • Hide attachments: enable if you don’t want to show review attachments;
  • Hide replies: enable if you don’t want to show the review replies.
Reviews block options

2. Show reviews of a certain product (shortcode, widget and block)

Classic editor – To print all the reviews posted on a specific product, use the following shortcode by adding the product ID.

[yith_ywar_show_reviews product_id = 123]

Block – To print all the reviews posted on a specific product, add the block Reviews to the page or widget.

Reviews block

Now enable/disable the following options as you need:

  • Product ID: enter the ID of the product;
  • Enable pagination: enable to show the pagination;
  • Hide action buttons (Edit, Reply, Helpful, Report): enable if you don’t want to show the buttons in the review;
  • Hide attachments: enable if you don’t want to show review attachments;
  • Hide replies: enable if you don’t want to show the review replies.

3. Show limited number of reviews (only shortcode)

To show a specific number of reviews, use the following shortcode by adding the related value. (Ex. To show two reviews, enter 2 as the parameter).

[yith_ywar_show_reviews reviews_number= 2]

4. Shortcode to display a full reviews section (shortcode, widget and block)

Classic editor – To show the reviews section on the product page, use the following shortcode.

[yith_ywar_show_reviews_form]

If you want to show the reviews section from a specific product outside the product page, for example in a custom landing page, you have to use the next shortcode, including the product ID as a parameter:

[yith_ywar_show_reviews_form product_id="1234"]

Block – To show the reviews section on any page, add the Reviews with form block to the page or widget.

Reviews with form block

To show the review section for a specific product only, enter the product ID in the related field.

Reviews with form for specific product

5. Shortcode to show the current user reviews (shortcode,widget and block)

Classic editor – To show a table with the reviews posted by the current user, use the following shortcode:

[yith_ywar_show_current_user_reviews]

Please note: reviews can only be written for products.

Block – To show a table with the reviews posted by the current user, add the Current user reviews block to the page or widget.

Current user reviews block