Home Forums ACF PRO Get field values by group Reply To: Get field values by group

  • So basically I would loop through acf_get_field_groups() to get the field keys, then loop through acf_get_fields() with the keys to get the field IDs, then loop through acf_get_value() with the field ID and post ID.

    I am creating an array with posts from a post type and their post meta and setting it as a transient (is this unnecessary?). I am currently using get_fields which works well but I wish I could separate the fields by group inside of the array easily so if there are any fields added I won’t have to go in and update the PHP.