grab testimonials from ACF post object list

This commit is contained in:
Matthias Kretschmann 2016-03-07 22:03:26 +01:00
parent 9fa4505694
commit cfe50bfbc9
1 changed files with 2 additions and 9 deletions

View File

@ -1183,17 +1183,10 @@ class Subtemplate {
//
public function testimonials($subtemplateTitle) {
$args = array(
'post_type' => 'testimonial',
'order' => 'ASC',
'orderby' => 'rand',
'posts_per_page' => 3
);
$testimonials = get_posts($args);
$testimonials = get_sub_field('testimonials');
$testimonialMarkup = '';
if (!empty($testimonials)) {
if ( $testimonials ) {
foreach ($testimonials as $testimonial) {
$id = $testimonial->ID;