Skip to content

Commit

Permalink
Query for template part autodraft with title
Browse files Browse the repository at this point in the history
The name is formatted differently than the slug
  • Loading branch information
noahtallen committed Sep 3, 2020
1 parent 48bd598 commit 93abd13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function create_auto_draft_for_template_part_block( $block ) {
array(
'post_type' => 'wp_template_part',
'post_status' => array( 'publish', 'auto-draft' ),
'name' => $block['attrs']['slug'],
'title' => $block['attrs']['slug'],
'meta_key' => 'theme',
'meta_value' => $block['attrs']['theme'],
'posts_per_page' => 1,
Expand Down

0 comments on commit 93abd13

Please sign in to comment.