Dandy Plugins
A collection of Gutenberg blocks built on top of ACF.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/firstandthird/dandy-blocks/archive/refs/heads/main.zipReadme
Dandy Blocks
A collection of Gutenberg blocks built on top of ACF.
Registering a new block
config.json
Blocks need to be added to the config.json file.
Inside of the config.json there is a blocks object. Object keys are the block slugs used for loading the template. The values of the object should match the options available to acf_register_block_type.
The basic structure should look like:
{
"blocks": {
"blockSlug": {
//... block options
}
}
}
Some block options are automatically configured and some can be overridden. Look at the acf_register_block_type section of dandy-blocks.php to see how the block is setup in code.
Templates
Place the block template in the blocks/<blockSlug>/block.php file. You may place css/js in the blocks/<blockSlug> directory/
Templates should use default clientkit classnames when possible and included styles should expect to be processed by CK (meaning you can use color variables and the like).
Styles & Javascript
No styles or javascript are loaded by default. It is up to the theme to import the styles and javascript. If you add styles or js to a block, make sure it gets imported to the root styles.css or scripts.js
Block styles should be prefixed with dandy-block__ to make sure there's no conflicts with existing blocks WordPress might have or other plugins register.
Theme Specific Blocks
Same format only you put a blocks.json in the theme root and follow the above.
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| 1.1.1 | Mar 18, 2022 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.