Support » Plugin: Insert Pages » How to allow ‘Insert Page’ Gutenberg Block Type

  • Resolved pmascis

    (@pmascis)


    Hi,

    Using Gutenberg, I choose to limit what blocks are available to the client, so that they aren’t overwhelmed with the amount of options they have to construct a page.

    I do this by hiding all blocks and displaying my chosen allowed block types.

    
    /**
     * Filter allowed Gutenberg block types
     */
    add_filter( 'allowed_block_types', 'my_allowed_block_types' );
    function my_allowed_block_types( $allowed_blocks ) {
        return array(
    //      'core/image',
    //      'core/paragraph',
            'acf/heading',
            'acf/paragraph',
            'acf/image',
       );
    }
    

    E.g. Above, I can restore the core blocks by referencing core/image and can display my custom blocks I make using ACF by referencing acf/image.

    I was wondering if you were able to advise how I can reference your Insert Page block so I can get it back in my list of allowed blocks, thanks!

    • This topic was modified 6 months ago by pmascis.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to allow ‘Insert Page’ Gutenberg Block Type’ is closed to new replies.