Skip to content

Commit 2bf9f60

Browse files
committed
Add 'fields' parameter to template part query to retrieve only IDs
1 parent 4ab5140 commit 2bf9f60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

includes/classes/blocks/class-template-parts.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ protected function maybe_create_template_part( $slug, $args, $theme ) {
220220
'posts_per_page' => 1,
221221
'post_status' => 'any',
222222
'no_found_rows' => true,
223+
'fields' => 'ids',
223224
'tax_query' => [
224225
[
225226
'taxonomy' => 'wp_theme',

0 commit comments

Comments
 (0)