• I’m using the code below for showing the current parents child terms in a sidebar, which generates a nice menu for navigating. However, once I visit the child term archive page, the menu doesn’t show anymore, since the code only looks for direct child terms of a parent.

    If anybody has a solution for this, I really appreciate it.

    <?php
                    $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
                    $taxonomy     = 'categorie';
                    $show_count   = 0;
                    $pad_counts   = 0;
                    $hierarchical = 1;
                    $title        = '';
    
                    $args = array(
                    'taxonomy'     => $taxonomy,
                    'orderby'      => $orderby,
                    'show_count'   => $show_count,
                    'pad_counts'   => $pad_counts,
                    'hierarchical' => $hierarchical,
                    'title_li'     => $title,
                    'child_of'     => $term->term_id
                    );
                    ?>
  • The topic ‘Showing taxonomy child terms on archive page’ is closed to new replies.