Support

Account

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