• Resolved Ricky Dawn

    (@thiswebguy)


    Hey I have another question, thanks for the support regarding the star images!

    My site uses bootstrap and I want to show my reviews in columns, however when you use the class= or even edit the template files I can’t see a way to add ‘row’ to the parent div, see here: https://pasteboard.co/JuhUoOK.png

    Is it possible? I’ve tried adding the row to other divs and have got as close as possible but it doesn’t display in columns. I’ve managed to do it for the summary.

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

    (@geminilabs)

    You have two options:

    1. Download the unreleased v5.0 and add the .row class to the reviews.php template:

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

    2. You can also use the site-reviews/reviews/reviews-wrapper filter hook provided in Site Reviews v4, however I don’t recommend this as it has been removed in v5.0. However, if you are uncomfortable using an unreleased version of Site Reviews, this is how you would use the hook:

    add_filter('site-reviews/reviews/reviews-wrapper', function ($wrapper) {
        $wrapper = str_replace('class="', 'class="row ', $wrapper);
        return $wrapper;
    });
    

    If you decide to go this route, make sure that you remove this hook and use the “reviews.php” template after v5.0 is released.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding class to direct parent div’ is closed to new replies.