Try this:
$reviews = glsr_get_reviews($args);
foreach ($reviews as $review) {
$html = $review->build();
echo $html->content;
}
See also the Functions documentation on the Help page.
Hi, Thank you for your answer.
But this won’t work, I get Show more /# link and my reviews are the same size.
Can you send me the documentation link?
Can you send me the documentation link?

It’s probably not working because the Site Reviews CSS requires the HTML to be structured in a specific way.
It’s assumed if you are using the functions that you are using your own CSS to style the reviews.
Here is a screenshot from one of the examples in the documentation on the Site Reviews “Help & Support” page:

To expand on this example:
// Build the HTML for each of the review fields
$reviewsHtml = $reviews->build();
// Add the correct class to the wrapper DIV
echo sprintf('<div class="%s">', $reviewsHtml->style);
foreach ($reviewsHtml as $reviewHtml) {
// display the rendered HTML of the review content
echo $reviewHtml->content;
// display the unrendered value of the review content
echo $reviewHtml->review->content;
}
echo '</div>';
The documentation for the glsr_get_reviews is sparse, which is why you will probably want to also make use of the glsr_debug helper function to help you figure things out:

-
This reply was modified 3 years, 7 months ago by
Gemini Labs.