Support

Account

Home Forums ACF PRO Can ACF return all fields with a custom query? Reply To: Can ACF return all fields with a custom query?

  • There are two choices that you can do that will cut down on the number of db requests.

    In ACF you can use get_fields(), will return all of the acf fields http://www.advancedcustomfields.com/resources/get_fields/. This will return all of the fields properly formatted by ACF.

    If you don’t care about having ACF format the values, would depend on what the field types are, in straight WP you can use get_post_meta($post_id) using this function without a specific meta_key will cause WP to get all post meta values in one query and put them into a cache.

    You can then use get_field() and the_field() if you want and these functions will not cause a new CB query because all of the meta values will be cached.