• Resolved oguruma

    (@oguruma)


    I would like to build a slider (I will probably use Flickity or something similar) by pulling in recent reviews (preferably 4+ Stars).

    I can’t just use the shortcode, because for the slider I would to use foreach to add the classes to each review.

    The idea is to be able to use recent comments like a testimonial slider like a lot of landing pages use.

    In the end I would want something like

    <ul id=”slider-id” class=”carousel”>
    <?php
    $gdcomments= whatever_the_function_is(array(
    ‘numbercomments’ => 4, // Number of recent posts thumbnails to display
    ‘post_status’ => ‘publish’ // Show only the published posts
    ‘post_id’ => ‘421’ //make a slider for a specific post

    ));
    foreach( $gdcomments as $somecomment ) : ?>
    <div class=”carousel-item”>
    <p> Comment text </p>
    </div>

    <?php endforeach; ?>
    `

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stiofan

    (@stiofansisland)

    Hi @oguruma,

    Our “recent reviews widget” has a slider built-in but you can’t currently limit it to a specific post id, i will add a task for that but it might take a week or two. If you have some Dev skills you can always copy our widget code and make your own specific widget the way you want.

    Thanks,

    Stiofan

    Thread Starter oguruma

    (@oguruma)

    @stiofansisland Are you sure the slider actually works? I just tried it on two different themes (one of them being twentynineteen) and the slider shows up as columns instead of actually functioning as a slider.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Function to bring in reviews for a slider?’ is closed to new replies.