Home › Forums › Backend Issues (wp-admin) › New block.json method yields "no block types exist" › Reply To: New block.json method yields "no block types exist"
hey all, I’ve checked the path that returns my json file and it’s definitely the right path but I still can’t register my block.
I triple-checked everything:
function register_acf_blocks() {
register_block_type( __DIR__ . '/blocks/custom-block/custom-block.json' );
}
add_action( 'init', 'register_acf_blocks' );
In my themefolder I’ve got a folder “/blocks/custom-block/” with my json file “custom-block.json” and a “custom-block.css” and “custom-block.php” file.
I’m working on a local install, ACF is latest (6.0.7) WP is latest (6.1.1) and I get no errors or warnings.
Anyone got other ideas why the block won’t register?
This is slowly driving me mad …
Thanks
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.