ACF Custom Database Tables v1.0

Heads up! You're browsing the documentation for an older version of the plugin. Consider checking out the current released version.

Activating support for a custom field type

If you are using custom ACF field types and wish to store their values in a custom database table, you need to register the field type as supported. You can do so using the following:

 * This will register a custom field type as supported by the plugin. 
 * This affects table definition generation and can go in your functions.php 
 * file or a plugin.
add_filter( 'acfcdt/is_supported_field', function ( $is_supported, $field ) {

    // registering a custom field type as supported
    if ( $field['type'] === 'acf_custom_field_type' ) {
        return true;

    return $is_supported;
}, 10, 2 );

If you have any issues with the data from a custom field type, please let us know about it so we can analyse how the custom field provides data and account for this in a future update.

Spot an issue? Please let us know about it.

Good dev stuff, delivered.

Product news, tips, and other cool things we make.

We never share your data. Read our Privacy Policy

© 2016 – 2024 Hookturn Digital. All rights reserved.