-
-
Save billerickson/d30e7c053d56ec442ae59f25a5f46a72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Block template for posts | |
* @see 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( 'acf/ad' ), | |
array( 'core/paragraph' ), | |
array( 'acf/ad' ), | |
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