Exclude Child Terms From Parent Posts

In your get_terms() call, try setting the hierarchical option to false:

$children_terms = get_terms($taxonomy, array(
        'parent' => get_term_by('slug', $parent_term, $taxonomy)->term_id,
        'hierarchical' => false
));

This option normally defaults to true, which is probably why you’re getting the extra copies.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)