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 2 years, 1 month ago by Gemini Labs.