Skip to content

Instantly share code, notes, and snippets.

@ryanwelcher
Last active July 19, 2022 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ryanwelcher/2a747a5c8a057e3784079e1b9ef84c8a to your computer and use it in GitHub Desktop.
Save ryanwelcher/2a747a5c8a057e3784079e1b9ef84c8a to your computer and use it in GitHub Desktop.
WordPress 6.0 Example: Example pattern PHP file to register a block pattern in the /patterns directory
<?php
/**
* Title: Example Block Pattern ( required field )
* Slug: block-pattern-example (required field)
* Description: This is an example of how to use the new /patterns directory to register a block pattern.
* Categories: featured, text
* Viewport Width: 800
* Keywords: example, block-theme, block-pattern
* Block Types: core/template-part/footer, core/post-content
* Inserter: yes
*/
?>
<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-large-font-size">Example Content</p>
<!-- /wp:paragraph -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment