// functions.php // Will only leave Image, Paragraph, Heading and List blocks function misha_allowed_block_types( $allowed_blocks, $post ) { $allowed_blocks = array( 'core/image', 'core/paragraph', 'core/heading', 'core/list' ); // Only for Page post type if( $post->post_type === 'page' ) { $allowed_blocks[] = 'core/shortcode'; } return $allowed_blocks; } add_filter( 'allowed_block_types', 'misha_allowed_block_types', 10, 2 );
Warning: Trying to access array offset on null in /home/clients/7f7a8d8eb6e40c50d3548b06c548734d/web/wp-includes/class-wp-query.php on line 3766