• Hello,

    I try to show only the top level categories. This is my current code:

    <?php
    $terms = apply_filters( 'taxonomy-images-get-terms', '', array('depth'=>1) );
    if ( ! empty( $terms ) ) {
    
        print '<ul class="categoriewrap">';
        foreach( (array) $terms as $term ) {
            print '<li class="categorie"><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'category' ) .  '</a></li>';
        }
        print '</ul>';
    }
    ?>

    what am I doing wrong in this case?

    Joost

    http://wordpress.org/extend/plugins/taxonomy-images/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with displaying categories only from top level’ is closed to new replies.