wpdb and acf via wp rest api
I ended up using $wpdb for my custom tables and went with wp_query for my custom posts with ACF fields $q = new WP_Query(array( ‘post_type’ => ‘coupon’, ‘post__in’ => $cids )); $coupons = array(); while($q->have_posts()) : $q->the_post(); $p = get_post(); $f = get_fields(); $m = array_merge((array)$p, (array)$f); array_push($coupons, $m); endwhile; And that’s how the cookie … Read more