Skip to content

Instantly share code, notes, and snippets.

@getdave
Created October 24, 2022 10:23
Show Gist options
  • Save getdave/5e58a168de744d5637aa1ab4f6813bc9 to your computer and use it in GitHub Desktop.
Save getdave/5e58a168de744d5637aa1ab4f6813bc9 to your computer and use it in GitHub Desktop.
Post Type Pattern in Gutenberg block editor WordPress
<?php
/**
* Title: Book Review
* Slug: twentytwentythree/book-review
* Categories: query
* Keywords: post meta
* Block Types: core/post-content
* Post Types: book
*/
?>
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":189,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="http://wpbetatesting.local/wp-content/uploads/2022/09/c8ed1df4-0cca-3030-ae6f-e6dbc4a387cd-1024x682.jpg" alt="" class="wp-image-189"/></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"fontSize":"large"} -->
<h2 class="has-large-font-size">Book Details</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Summary text here. Provide a brief description of the book. It shoudl be short and succient without going into too much detail.</p>
<!-- /wp:paragraph -->
<!-- wp:table -->
<figure class="wp-block-table"><table><tbody><tr><td>Author</td><td>John Doe</td></tr><tr><td>IBAN</td><td>XXXXXX</td></tr><tr><td>Genre</td><td>Fiction/Non-fiction</td></tr><tr><td>Price</td><td>£0.00</td></tr></tbody></table></figure>
<!-- /wp:table --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment