Skip to main content

Yoast SEO: Filtering Yoast Blocks

As of Yoast SEO 8.2, we've added our first two structured data blocks: The FAQ block and the How-To block.

Available blocks

Currently, the following blocks are available within Yoast SEO

FAQ blockyoast/faq-block
How-To blockyoast/how-to-block


Although WordPress allows you to filter out Blocks by utilizing the allowed_block_types filter, this filter contains some limitations. A better approach to filter out Blocks, is to use a JavaScript implementation. Please note that this also means you have to register a JavaScript file via the wp_enqueue_script method in your own plugin or theme (i.e. functions.php), as follows:

// MyCustomPlugin.php
// Your plugin code here.

plugins_url( 'js/MyCustomBlocksFilter.js', __FILE__ ),

Let's say that you want to only load the FAQ block out of the list of Yoast structured data blocks, and thus want to filter out the How-To block:

// js/MyCustomBlocksFilter.js
const hiddenBlocks = [ 'yoast/how-to-block' ];

wp.blocks.getBlockTypes().forEach( function( block ) {
if ( && hiddenBlocks.includes( ) ) {
wp.blocks.unregisterBlockType( );
} );

Inverting the logic of the if-statement (i.e. negating hiddenBlocks.includes( )), will allow you to limit what blocks you do want to be loaded.