mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 17:23:55 +01:00
grab testimonials from ACF post object list
This commit is contained in:
parent
9fa4505694
commit
cfe50bfbc9
@ -1183,17 +1183,10 @@ class Subtemplate {
|
|||||||
//
|
//
|
||||||
public function testimonials($subtemplateTitle) {
|
public function testimonials($subtemplateTitle) {
|
||||||
|
|
||||||
$args = array(
|
$testimonials = get_sub_field('testimonials');
|
||||||
'post_type' => 'testimonial',
|
|
||||||
'order' => 'ASC',
|
|
||||||
'orderby' => 'rand',
|
|
||||||
'posts_per_page' => 3
|
|
||||||
);
|
|
||||||
|
|
||||||
$testimonials = get_posts($args);
|
|
||||||
$testimonialMarkup = '';
|
$testimonialMarkup = '';
|
||||||
|
|
||||||
if (!empty($testimonials)) {
|
if ( $testimonials ) {
|
||||||
foreach ($testimonials as $testimonial) {
|
foreach ($testimonials as $testimonial) {
|
||||||
|
|
||||||
$id = $testimonial->ID;
|
$id = $testimonial->ID;
|
||||||
|
Loading…
Reference in New Issue
Block a user