Is there a filter I can use to customize what is rendered by the hivepress reviews block (or any other such block) such that if no reviews are found for the listing I can override what is rendered such that something like
No reviews have been submitted yet. Be the first! Submit a review
is rendered instead?
Any pointers as to the best way to accomplish this? Thank you.
Thank you! I’ve added this code to the functions.php file in our child theme folder but it does not seem to have any effect. Do you have any advice for how to debug/troubleshoot this filter code? What should the html look like if the custom review block content is successfully merged? As it stands nothing is rendered at all for the Reviews (Related) block in our “Listing” template if there are no reviews.
Thanks for your assistance.
However, the custom content (‘Custom text’) does not appear anywhere in the rendered page. Do I need to add something to the Listing template to have this content get rendered on the page?
Thanks for the initial code snippet @yevhen . I was not able to incorporate the template code needed to include a link to “Write a Review” in the content. I think I need to somehow render the template from the hivepress-reviews extension (templates/listing/view/page/review-submit-link.php) in the content string value. Can you offer any clues as to how to go about doing that?