• Resolved lausam

    (@lausam)


    So, how to inject custom code between the reviews? Let’s say I wan’t to display ads after the 3rd review in the list. How should I do it?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    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>
Viewing 1 replies (of 1 total)
  • The topic ‘How to inject custom content between the reviews’ is closed to new replies.