This topic has 6 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #111395
     the-wire
    Participant

    Hello,

    I am using kleo_testimonials shortcode to display testimonials on a page and I would like them to appear in random order. Would that be possible?

    Thanks!

    #111603
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #113700
     Radu
    Moderator

    Hi,

    That is not possible, but you can use Kleo Post visual element from Visual Composer by choosing -> build query -> choose kleo testimonials and order by Random, play with settings of the module.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #113703
     the-wire
    Participant

    The Kleo Post returns the excerpt. Any suggestion on how to get the full testimonial?

    Thanks

    #113848
     Radu
    Moderator

    Hi,

    Just use the testimonial visual element and add this function to wp-content/themes/kleo-child/functions.php it will show random your testimonials

    COPY CODE
    add_action( 'pre_get_posts', 'kleo_random_order_testimonials' );
    function kleo_random_order_testimonials( $query ) {
        if(isset($query->query['post_type'])) {
            if($query->query['post_type'] == 'kleo-testimonials') {
                $query->set('orderby', 'rand');
            }
        }
    }

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #113854
     the-wire
    Participant

    That’s great. Thanks!

    #114077
     Radu
    Moderator

    You’re welcome

    Have a nice week

    I will mark the topic as resolved

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?