Last active
February 8, 2022 16:15
-
-
Save ryanwelcher/fba7484d4a853a259a3c0e20f5bfd869 to your computer and use it in GitHub Desktop.
A block pattern containing a Query Loop with locked Post Title and Featured Image blocks
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( | |
'locking-examples/locked-query-loop', | |
array( | |
'title' => esc_html__( 'Query Loop with locked Post Title and Featured Image blocks', 'locking-examples' ), | |
'categories' => array( 'query' ), | |
'content' => '<!-- wp:query {"queryId":26,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false}} --> | |
<div class="wp-block-query"><!-- wp:post-template --> | |
<!-- wp:post-title {"isLink":true,"lock":{"remove":true}} /--> | |
<!-- wp:post-featured-image {"isLink":true,"align":"wide","lock":{"remove":true}} /--> | |
<!-- wp:post-date /--> | |
<!-- wp:post-excerpt /--> | |
<!-- wp:separator --> | |
<hr class="wp-block-separator"/> | |
<!-- /wp:separator --> | |
<!-- /wp:post-template --></div> | |
<!-- /wp:query --> | |
', | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment