Support

Account

Forum Replies Created

  • 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.

  • Sorry to revive an old thread but has this changed in V5? I simply would like to get all custom fields name/values for a post grouped by group ID.

Viewing 2 posts - 1 through 2 (of 2 total)