Skip to content

Commit 7834583

Browse files
authored
fix: do not include child terms for sponsored categories (#179)
1 parent 12f8dd7 commit 7834583

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

includes/newspack-sponsors-theme-helpers.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,10 @@ function get_sponsor_posts_for_terms( $terms ) {
307307
foreach ( $terms as $term ) {
308308
if ( ! empty( $term->taxonomy ) && ! empty( $term->term_id ) ) {
309309
$tax_query_args[] = [
310-
'taxonomy' => $term->taxonomy,
311-
'field' => 'term_id',
312-
'terms' => $term->term_id,
310+
'taxonomy' => $term->taxonomy,
311+
'field' => 'term_id',
312+
'terms' => $term->term_id,
313+
'include_children' => false,
313314
];
314315
}
315316
}

0 commit comments

Comments
 (0)