Hide or show Gutenberg custom block using date range
Here’s an untested suggestion, to remove an HTML block of type: <!– wp:block/timed-block {“dateFrom”:”2018-11-14″, “dateTo”:”2018-12-18″} –> <section> … </section> <!– /wp:block/timed-block –> from the rendered content, using the render_block filter (available in 5.0+): add_filter( ‘render_block’, function( $block_content, $block ) { // Remove the block/timed-block from the rendered content. if ( ‘block/timed-block’ === $block[‘blockName’] ) { … Read more