Created
February 9, 2023 20:18
-
-
Save annezazu/99ce2f84fa033dae48eacc50a8287bae to your computer and use it in GitHub Desktop.
Register patterns for specific template types
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
register_block_pattern( | |
'wp-my-theme/404-template-pattern', | |
array( | |
'title' => __( '404 Only template pattern', 'wp-my-theme' ), | |
'templateTypes' => array( '404' ), | |
'content' => '<!-- wp:paragraph {"align":"center","fontSize":"x-large"} --><p class="has-text-align-center has-x-large-font-size">404 pattern</p><!-- /wp:paragraph -->', | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code provided by @jonathanbossenger