Home Forums Gutenberg Blocks – registering with json not showing


Blocks – registering with json not showing

  • I’m switching my block registering from php to json, they are recognised when I make a new field group under Location rules > Blocks

    But when I try to choose them on the page from the block inserter (+) they aren’t listed, they were working when I registered as json.

    JSON file

        "name": "acf/accordion",
        "title": "Accordion",
        "description": "",
        "style": [ "file:./dist/assets/css/editor.css" ],
        "category": "AVIDD",
        "icon": "admin-comments",
        "keywords": ["accordion"],
        "acf": {
            "mode": "preview",
            "renderTemplate": "template-parts/blocks/accordion.php"
        "align": "full"

    Functions file

    add_action( 'init', 'register_acf_blocks' );
    function register_acf_blocks() {
        register_block_type(  __DIR__ . '/acf-accordion/block.json' );
  • EDIT: I meant to say they were working when registered as php not json

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.