Tags Input

A Tagify-powered tag input that lets editors type and enter tags as chips. Supports an optional whitelist for restricted vocabularies, automatic WordPress taxonomy synchronisation, and configurable min/max counts.

Pro field

Tags Input requires the Extra Fields for ACF Pro license.

Settings

SettingDefaultDescription
Whitelist(empty)Comma-separated allowed tags. Leave empty to allow any tag.
Taxonomy Sync(none)WordPress taxonomy to auto-save new tags as terms when the post is saved.
Min Tags0Minimum number of tags required. 0 = no minimum.
Max Tags0Maximum tags allowed. 0 = unlimited.
Max Tag Length0Character limit per individual tag. 0 = unlimited.
SeparatorenterKey that creates a tag: enter · comma · both.
Return Formatarrayarray · csv · json

Return values

return_format: 'array'

Returns a PHP array of tag strings.

$tags = get_field('post_tags');
// ['WordPress', 'PHP', 'ACF']
foreach ($tags as $tag) {
    echo '<span class="tag">' . esc_html($tag) . '</span>';
}

return_format: 'csv'

Returns a comma-separated string.

$tags_csv = get_field('post_tags');
// "WordPress,PHP,ACF"
$tags = explode(',', $tags_csv);

return_format: 'json'

Returns a JSON-encoded array string.

$tags_json = get_field('post_tags');
// '["WordPress","PHP","ACF"]'
$tags = json_decode($tags_json, true);

Usage

Displaying as a tag list

$tags = get_field('skills');
if ($tags) {
    echo '<ul class="tag-list">';
    foreach ($tags as $tag) {
        echo '<li>' . esc_html($tag) . '</li>';
    }
    echo '</ul>';
}

Restricting to a whitelist

Set the Whitelist field to a comma-separated list in the field settings:

JavaScript, TypeScript, React, Vue, PHP, WordPress

Editors will only be able to select tags from this list — free-form entry is blocked.

Syncing with a taxonomy

Set Taxonomy Sync to any registered taxonomy (e.g. post_tag, skill). When a post is saved, each entered tag is automatically created as a term in that taxonomy and the post is assigned to those terms.

// Tags are also queryable via taxonomy after sync
$posts = get_posts([
    'tax_query' => [[
        'taxonomy' => 'skill',
        'field'    => 'name',
        'terms'    => 'WordPress',
    ]],
]);