Hi @samsmyth. From what I understand, the php file (template) for your block behave as a callback. And therefore is called only when the block is encountered or added to the Gutenberg Editor.
This block has to be registered before it’s called…
If you want to keep things apart, you can create a separate file “register-acf-blocks.php” then call it at the top of your function.php like this :
/** * Include my file containing all my ACF Blocks Registrations */ include( __DIR__ . '/includes/register-acf-blocks.php' );
You can then, of course, store this file where you want in your project.
Hope this helps.
Best regards !
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!