Snippets: How to Override Default Post “Block” Section

// Example for overriding a default Blog Post "block" or section
// You can add print_r( $blocks ) inside your function and refresh your page to view a list of all available blocks on your site
function my_edit_blog_single_layout_blocks( $blocks ) {
	$blocks['featured_media'] = function() {
		echo 'My custom featured media output';
	return $blocks;
add_filter( 'wpex_blog_single_layout_blocks', 'my_edit_blog_single_layout_blocks' );

Snippet Type: PHP

Posted Under: Blog

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)