Skip to content

Commit

Permalink
Theme cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khleomix committed Aug 23, 2024
1 parent 7147bf0 commit 926fafc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 105 deletions.
1 change: 0 additions & 1 deletion assets/scss/patterns/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// 'patterns/' houses styles for custom patterns.
// @import './pattern-name';
@import './related-posts';
19 changes: 0 additions & 19 deletions assets/scss/patterns/related-posts.scss

This file was deleted.

73 changes: 0 additions & 73 deletions inc/functions/related-posts-query.php

This file was deleted.

8 changes: 4 additions & 4 deletions inc/hooks/register-block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
function register_custom_block_pattern() {

register_block_pattern(
'wdsbt/related-posts',
'wdsbt/pattern-name',
array(
'title' => __( 'Related Posts', 'wdsbt' ),
'title' => __( 'Pattern Title', 'wdsbt' ),
'blockTypes' => array( 'core/query' ),
'templateTypes' => array( 'single-post' ),
'postTypes' => array( '' ),
'description' => _x( 'Related Posts query variation', 'Block pattern description', 'wdsbt' ),
'content' => '<!-- wp:group {"tagName":"aside","metadata":{"name":"Related Posts"},"style":{"spacing":{"margin":{"top":"var:preset|spacing|40"},"padding":{"bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} --><aside class="wp-block-group" style="margin-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:query {"queryId":0,"query":{"perPage":"2","pages":0,"offset":0,"inherit":false},"className":"related-posts"} --><div class="wp-block-query related-posts"><!-- wp:post-template {"className":"related-posts-query","layout":{"type":"grid","columnCount":null,"minimumColumnWidth":"22rem"}} --><!-- wp:post-featured-image {"isLink":true,"aspectRatio":"16/9"} /--><!-- wp:post-terms {"term":"category"} /--><!-- wp:post-title {"isLink":true} /--><!-- wp:post-excerpt {"excerptLength":20} /--><!-- wp:read-more /--><!-- /wp:post-template --></div><!-- /wp:query --></aside><!-- /wp:group -->',
'description' => _x( 'Block Pattern Name', 'Block pattern description', 'wdsbt' ),
'content' => '',
)
);
}
Expand Down
8 changes: 0 additions & 8 deletions templates/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@
</div>
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|40"},"padding":{"bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group"
style="margin-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--50)">

<!-- wp:pattern {"slug":"wdsbt/related-posts"} /-->
</div>
<!-- /wp:group -->

</main>
<!-- /wp:group -->

Expand Down

0 comments on commit 926fafc

Please sign in to comment.