• Resolved frlnbrg

    (@frlnbrg)


    Hi everyone,

    I just discovered your plugin and really love it. Thank you so much for your work!

    I came upon one small problem that I can’t get my head around: In my functions.php I wrote a few lines of code to disable all Gutenberg blocks by default and then enable only the ones I need (image, paragraph, heading). I want to add metaslider to the list, but I don’t quite know how. Can you help?

    You can find my code below, including my unsuccessful approach to add the metaslider block type. I would appreciate any help on this topic (sadly, both google and this forum didn’t provide any solutions). Thank you so much!

    // enable just the necessary gutenberg blocks
    add_filter( 'allowed_block_types', 'my_allowed_block_types' );
    function my_allowed_block_types( $allowed_blocks ) {
        return array(
            'core/image',
            'core/paragraph',
            'core/heading',
            'metaslider-slider' // <- this is the line that doesn’t work
        ); 
    }
    • This topic was modified 4 years, 11 months ago by frlnbrg.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I enable the metaslider Gutenberg block?’ is closed to new replies.