Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created November 23, 2019 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/91770c8cc043ccc3e6dd0e18129fcb52 to your computer and use it in GitHub Desktop.
Save billerickson/91770c8cc043ccc3e6dd0e18129fcb52 to your computer and use it in GitHub Desktop.
<?php
/**
* Block template for posts
* @link https://www.billerickson.net/gutenberg-block-templates/
*
*/
function be_post_block_template() {
$post_type_object = get_post_type_object( 'post' );
$post_type_object->template = array(
array( 'core/paragraph' ),
array( 'core/image' ),
array( 'core/paragraph' ),
array( 'core/image' ),
array( 'core/paragraph' ),
);
}
add_action( 'init', 'be_post_block_template' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment