ACF – get fields from group

Thank you so much for your post, I spent half day to figure out how to get field names by their group. If you have field names, you can easily get their values: get_field($field[‘name’]); EXAMPLE HOW TO GET IMAGES FOR SLIDER <?php //or insert the ID of your fields Group. $groupID=’116′; $custom_field_keys = get_post_custom_keys($groupID); foreach … Read more

Filtering multiple custom fields with WP REST API 2

This solution works with get_items() in /lib/endpoints/class-wp-rest-posts-controller.php of the v2 WP Rest API. First, you’ll want to construct the GET arguments like you would for a new WP_Query(). The easiest way to do this is with http_build_query(). $args = array ( ‘filter’ => array ( ‘meta_query’ => array ( ‘relation’ => ‘AND’, array ( ‘key’ … Read more