I am calling:
and expected just one testimonial, but all seem to be output.
I looked in
tb-testimonials.phpline 736 and assumed that:
$q = new WP_Query( array( 'post_type' => 'testimonial', 'post_status' => 'publish', 'orderby' => 'rand', 'showposts' => 1 ) );
would only output one due to
'showposts' => 1but I assume my knowledge of WP is not correct.
(saw this on the WP class reference:
Display one random post: $query = new WP_Query( array ( 'orderby' => 'rand', 'posts_per_page' => '1' ) );
[‘posts_per_page’ is preferred to ‘showposts’]
Or is there another way to achieve this with tbtestimonial?
- The topic ‘Display just one testimonial’ is closed to new replies.