random order, output maximum of 3 testimonials

This commit is contained in:
Matthias Kretschmann 2016-03-07 21:30:09 +01:00
parent 576b8a025b
commit 9fa4505694
1 changed files with 4 additions and 2 deletions

View File

@ -1184,8 +1184,10 @@ class Subtemplate {
public function testimonials($subtemplateTitle) {
$args = array(
'post_type' => 'testimonial',
'order' => 'ASC'
'post_type' => 'testimonial',
'order' => 'ASC',
'orderby' => 'rand',
'posts_per_page' => 3
);
$testimonials = get_posts($args);