BoxyBird ACF Blocks
A WordPress plugin to scaffold and register Advanced Custom Fields PRO Gutenberg Blocks.
by Andrew Rhyand · github.com/boxybird/wordpress-acf-blocks-plugin
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/boxybird/wordpress-acf-blocks-plugin/archive/refs/heads/master.zipReadme
Installation
Clone or download the plugin and run npm install && npm run dev.
Scaffold Block
sh scaffold-block.sh
Usage:
$ sh scaffold-block.sh
Block name?
foo-block
Template type?
1) PHP/Vanilla JS
2) Vue
#? 2
Examples of each block found in ./blocks
Watch Files
npm run watch
If you scaffold a new block, you must stop and restart watcher.
Production
npm run build
Notes
This is a starter plugin I built for my own use. Feel free to customize it to your needs.
My goal was to have a way to quickly create new ACF blocks to extend functionality of a custom theme.
You'll notice there is styling solution for each block. I tend to have all styles contained within the theme.
Other helpful places to look
/inc/setup.php
/inc/enqueue.php