How to inject custom content between the reviews

[ad_1]

To do this, you will need to use a custom reviews.php template in your child theme as explained in the Site Reviews > Help & Support > FAQ page.

For example, change this:

<div class="glsr-reviews-wrap">
    <div class="{{ class }}">
        {{ reviews }}
    </div>
    {{ pagination }}
</div>

To this:

<div class="glsr-reviews-wrap">
    <div class="{{ class }}">
    <?php
        if (empty($reviews)) {
            echo '{{ reviews }}'; // display the fallback text
        }
        foreach ($reviews as $index => $review) {
            $review->render($args->toArray());
            if (2 === $index) { // $index starts at 0
                // render custom stuff here...
            }
        }
    ?>
    </div>
    {{ pagination }}
</div>

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer