Skip to content

Commit 10677a7

Browse files
jillrojillroSirLouenntsekourast-hamano
authored
Terms Query Block: Fix Max terms for non-hierarchical taxonomies (#74130)
Co-authored-by: jillro <[email protected]> Co-authored-by: SirLouen <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]>
1 parent d0d04f2 commit 10677a7

File tree

1 file changed

+1
-1
lines changed
  • packages/block-library/src/term-template

1 file changed

+1
-1
lines changed

packages/block-library/src/term-template/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function render_block_core_term_template( $attributes, $content, $block ) {
5959
$query_args['include'] = array_unique( array_map( 'intval', $query['include'] ) );
6060
$query_args['orderby'] = 'include';
6161
$query_args['order'] = 'asc';
62-
} elseif ( empty( $query['showNested'] ) ) {
62+
} elseif ( is_taxonomy_hierarchical( $query['taxonomy'] ) && empty( $query['showNested'] ) ) {
6363
// We set parent only when inheriting from the taxonomy archive context or not
6464
// showing nested terms, otherwise nested terms are not displayed.
6565
$query_args['parent'] = 0;

0 commit comments

Comments
 (0)