Our plugin provides shortcodes to show reviews in the grid and slider layouts ([cusrev_reviews_grid] and [cusrev_reviews_slider). You can find detailed information about these shortcodes on the Shortcodes tab in the plugin's settings in WordPress.


The shortcodes support various parameters. One of them is called products and enables you to display reviews from specific products only. For example, you can use this parameter to show a grid of reviews from products with IDs equal to 123 and 234 only:

[cusrev_reviews_grid products="123,234"]

In the example above, the product IDs are provided as a static parameter of the shortcode meaning that they have to be explicitly specified. If you put this shortcode on a product page and want it to display reviews only from that particular product, you will need to manually specify the current product ID in the "products" parameter. Then, if you would like to repeat the same shortcode on a page of a different product, you will need to update the product ID in the shortcode parameter again.


Is it possible to get the current product ID in the shortcode parameters automatically? Yes, but it will require a little code snippet. We can get the product ID of the current product via the standard WordPress function get_queried_object_id() and then print it with the shortcode in the product template.


Here is an example:

echo do_shortcode( '[cusrev_reviews_grid products=' . get_queried_object_id() . ' shop_reviews="false" ]' );

We hope that this solution was helpful. If not, please don't hesitate to reach out to us on the support forum. If you have a Pro license, please create a ticket on this portal for priority support. We are always available to help.