1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. Advanced Usage

How to display ACF group fields

Our Document Library Pro, WooCommerce Product Table and Posts Table Pro plugins all support displaying fields created using the Advanced Custom Fields (ACF plugin). To display a custom field, you simply add a custom field column to the table.

The process is a little more complicated for displaying sub-fields which you created as part of an ACF group field. This article explains how to do this.

ACF group field
An example of an ACF group field

How to display a sub-field under a 'Group' type custom field:

  • Create the table as usual using either Document Library Pro, WooCommerce Product Table or Posts Table Pro.
  • Create a custom field column. This depends on which plugin you are using:
    • Document Library Pro - Add the following to your list of columns: cf:group_cf_text_in_group, replacing group_cf with the actual group name, and text_in_group with the actual name of the sub-field. You can repeat this for as many sub-fields as you wish to display. For example, this list of columns will display the document name, add to cart buttons, and two sub-fields which are part of the 'group_cf' group: title,cf:group_cf_text_in_group,cf:group_cf_second_field
    • WooCommerce Product Table - Add the following to your list of columns: cf:group_cf_text_in_group, replacing group_cf with the actual group name, and text_in_group with the actual name of the sub-field. You can repeat this for as many sub-fields as you wish to display. For example, this list of columns will display the product name, add to cart buttons, and two sub-fields which are part of the 'group_cf' group: name,buy,cf:group_cf_text_in_group,cf:group_cf_second_field
    • Posts Table Pro - When creating a table using the table builder, add an 'Other custom field' column and add it using the syntax cf:group_cf_text_in_group, replacing group_cf with the actual group name, and text_in_group with the actual name of the sub-field. Add additional custom field columns for each sub-field that you wish to display.
ACF group field names
How to find the name of each sub-field within the ACF group

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.