Advanced Custom Fields & Admin Columns integration
Why use Admin Columns with ACF
Advanced Custom Fields (ACF) brings limitless possibilities for adding extra data to WordPress content by creating custom fields. Admin Columns allows you to display any ACF custom field data on your Posts and User tables within the WordPress admin.
By adding ACF fields to the list table you will not only display ACF data but also make it filterable, sortable, editable (inline & bulk) and you can export content for further use.
Download & Install the ACF integration add-on
Before we can begin you will need to install the ACF integration add-on. Here is how to install the ACF integration add-on.
How to display an ACF field on the Posts list table
- Go to the column settings screen: Dashboard > Settings > Admin Columns.
- Select the Custom Post Type from the menu.
- Click the + Add Column button in the lower right.
- Select Advanced Custom Fields from the column Type dropdown.
Select your ACF field from the Field dropdown. All ACF field types you have created will be available.
Click Update to save your columns.
Click on View to see the added column on the Posts list table.
Some ACF column types have additional display options. For example, you can crop the length of Text or set the dimensions for an Image.
In this example, we have set the maximum number of words to 10, and the image size to 180 by 100 pixels.
Admin Columns Pro adds additional functionality to your list table:
||Allows you to export any content from the list table to a CSV file. This includes custom field and ACF data.|
||Make your column sortable. Sort the content of your columns ascending and descending on the list table. This works on custom field and ACF data.|
| Inline Editing
||It's like WordPress Quick Edit but better. It is easier to use and it works on ACF data. Inline Editing will be a huge time saver when you are making many changes.|
| Bulk Editing
||This allows you to select multiple or all posts and make changes to your ACF content in bulk.|
|Smart Filtering||Smart Filters are very powerful filters that allow you to filter and search your ACF content very specifically. You can search partial strings or exact matches per ACF field type.|
Supported ACF Field types
This complete list shows you which ACF field types can be shown on the list table and whether they are sortable, filterable, inline- & bulk-editable, and exportable to CSV.
|True / False|
|Date Time Picker|
Supported list tables
You can add your ACF fields as columns to the following list tables:
- Posts, Pages and Custom Post Types
- Taxonomies; such as Tags, Categories, and Custom Taxonomies
Examples of use
Custom Post Types
In this example, we created a custom post type "Houses", because Real estate websites commonly need to use custom fields to allow them to display their listings. They must display data such as Number of Bedrooms, Number of Baths, Size of Home, and Price. With the Admin Columns integration for ACF, this custom field data can now be shown on the Houses list table within the admin area.
Admin Columns can display any ACF content (by adding columns) on to the list table. The ACF data will be sortable, filterable, searchable, and bulk editable.