ACF blocks example data
Try to set example data for ACF blocks automatically based on field type.
by Digitoimisto Dude Oy · github.com/digitoimistodude/air-blocks-acf-example-data · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/digitoimistodude/air-blocks-acf-example-data/releases/download/1.0.5/air-blocks-acf-example-data.zipReadme
ACF blocks example data
Try to set example data for ACF blocks automatically based on field type. If theme sets the example data, plugin tries to fill those where suitable. So the theme example data is always the defining place, if automatic data isn't wanted.
Using with composer
Add to repositories:
{
"type": "vcs",
"url": "https://github.com/digitoimistodude/air-blocks-acf-example-data"
},
Then run:
composer require digitoimistodude/air-blocks-acf-example-data
All blocks page
Plugin creates automatically page /blocks that shows all registered ACF blocks with their example data. The page is visible on production environment when user is logged in, other environment do not require login.
Supported field types
Currently following ACF field types are supported:
- Text
- Textarea
- Wysiwyg
- Link
- Url
- Image
- Gallery
- Relationship
- Repeater
- Group
- Select __(only with icon_svg fields)__
Hooks
The default example datas for fields can be totally modified with general hooks or tweaked a little. For field type tweaks, all filters receive $field_name and $field as an addigional parameters.
Modify field default content
Default content for fields can be modified with air_block_acf_example_data filter. All filters modifying data receive $field_type, $field_name and $field as an addigional parameters.
By field type
air_block_acf_example_data/{$field_type}
By field name
air_block_acf_example_data/{$field_name}
Set default svg icon
Set filename for the svg icon that is used as default one for svg icon select fields. Svg file should be placed in svg/foruser directory.
add_filter( 'air_acf_block_example_data_default_svg_icon', function() {
return 'icon.svg';
} );
Set gallery images count
By default, all gallery blocks do get assigned with three images. This can be changed via hook for all gallery fields or by field name.
add_filter( 'air_block_acf_example_data_gallery_images_count/{$field_name}', function() {
return 5;
} );
```php
add_filter( 'air_block_acf_example_data_gallery_images_count', function() {
return 5;
} );
Repeater field items count
By default, repeater field tries to use value set to min on determining how many items the repeater should contain. If no value is set, three is used. This can be changed via hook for all gallery fields or by field name.
add_filter( 'air_block_acf_example_data_repeater_count/{$field_name}', function() {
return 5;
} );
```php
add_filter( 'air_block_acf_example_data_repeater_count', function() {
return 5;
} );
Relationship field posts
Modify the WP_Query arguments used to get example data for relationship field.
air_block_acf_example_data_relationship_query_args/{$field_name}
air_block_acf_example_data_relationship_query_argsRead the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 1.0.5 | Jan 9, 2026 | air-blocks-acf-example-data.zip | 8 |
| 1.0.4 | Jan 9, 2026 | air-blocks-acf-example-data.zip | 1 |
| 1.0.3 | Jan 9, 2026 | — | — |
| 1.0.2 | May 6, 2025 | air-blocks-acf-example-data.zip | 0 |
| 1.0.1 | May 6, 2025 | air-blocks-acf-example-data.zip | 0 |
| 1.0.0 | May 5, 2025 | air-blocks-acf-example-data.zip | 0 |